Version: 3.5.7 (using KDE KDE 3.5.7) Installed from: Compiled From Sources Compiler: GCC 4.1.2 OS: Linux When text is written to an element with white-space: pre; using Javascript DOM methods, the carriage return of any \r\n sequences displays as an unprintable character. This is a fairly serious problem because IE doesn't recognise \n as a linebreak. Note that the bug does not occur when using innerHTML, but does occur when setting the contents of a text node with .nodeValue. Minimal test case: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Test page</title> </head> <body> <p style="white-space: pre;"></p> <script type="text/javascript"> document.getElementsByTagName("p")[0].appendChild( document.createTextNode("some\r\ntext\r\nhere") ); </script> </body> </html>
some* text* here Is what displays for me, where instead of * I get what looks like a half note, but I can't cut-and-paste it to here. Confirming in branch 4.0 r793993 (~4.0.3)
Created attachment 47957 [details] Testcase Testcase showing the bogus behaviour and how innerHTML works fine.
Confirming in 4.5.4, updating version.
Thank you for the bug report. As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.