Thanks, but i need to use it in a xml file and if I use <br /> in another xml tag i wont get the whole node. But I could use something like [br] and then convert it to <br /> later. But im not sure how to convert back a text that uses [] I get it wrong when I write this:
- var my_string = 'hello this is a text[br]this is the next row';
-
my_string = String.replace(my_string,/[br]/g,'<br />');
it doesnt replace the whole [br] tag..
edit:
nvm I can just use this when i try to output the text:
my_string = String.replace(my_string,/[\n]/g,'<br />');
instead of replacing the \n before i put it in the mySQL database.