well, the problem is : the HTML comes from a javascript-based HTML-editor (using an IFRAME that's editable, it's built-in in IE and I think it's also used in hotmail, you know, the rich text editor), and then gets stored into the database. Now, it's crucial that, when putting it back into the text-editor (with a javascript variable) all newlines are replaced by \n (which will translate to \n after echo-ing, so javascript knows there is a newline). This seems to work most of the time, but not always, and I can't seem to figuere out when the problem occurs. Does anyone know of a better way to replace the newlines?
just replacing \n by \n doesn't work either... maybe I'll have to try with regex?