Code in the post has been modified.
I was thinking that replacing \n with
with javascript was quite a simple task, but it seems not to be so. Posts in Ask Ben or StackOverflow suggest that something as simple as:
var myRe = new RegExp(/\r?\n/g); // to avoid the re literal caching problem
lDes = $("div.descr").html();
lDes = lDes.replace (myRe, "<br/>");
lDes = lDes.replace (/(http:\/\/\S+)/g, "<a target=\"blank\" href=\"$1\">$1</a>");
$("div.descr").html(lDes);
will get the job done. Indeed, this work in FF and Safari but not in IE.
Or, using postie (great hint!)
Text has been created in a textarea and then stored in a database, then retrieved without further processing. It works using FF on windows and Safari on Mac. IE on windows, nada. Is it a major bug in my head? Is it a JQuery issue?
Have some idea about how to solve this? And possible reason for?
Many thanks