I tried to do it using strings.Replace(s,"\n","<br>",-1); But the result is something different which could be displayed as <br> in a web browser but is in fact not "<br>". Can anyone tell me how to do this?

My primary goal is to change the end of line character from a <textarea> into a <br> tag in html.

Any clue would be welcome, thanks in advance.

PS:

Q: Are you trying to get it from database?

A: Yeah, I get the string from GAE's database, and then replace \n with <br>. Is there anything different with string from database?

Edit
Report