J
Jake Barnes
This was working for me, and now it isn't, and I can't remember what i
changed - the idea was to imitate the PHP command nl2br, which takes
newlines and turns them into newlines plus BR tags. Does anyone see
anything wrong with this?
function nl2br_js(myString){
var regX = /\\n/g;
var replaceString = '<br> \\n';
return myString.replace(regX, replaceString);
}
changed - the idea was to imitate the PHP command nl2br, which takes
newlines and turns them into newlines plus BR tags. Does anyone see
anything wrong with this?
function nl2br_js(myString){
var regX = /\\n/g;
var replaceString = '<br> \\n';
return myString.replace(regX, replaceString);
}