Closed
Bug 117617
Opened 24 years ago
Closed 22 years ago
innerHTML looses newlines
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: georg, Unassigned)
References
()
Details
Attachments
(4 files)
The getter part of the innerHTML implementation sometimes looses some newline
characters. I don't know the conditions which trigger this bug, but there is a
sample page on the web, where you can see the bug. Because thes page tests for
the bug before doing any modifications the parts, where the bug aoccures are not
modified. In this sample the realted Elements are PRE tags. Without modifying
them the newlines are present, but when reading from innerHTML they go lost. So
the bug must be in the getter part of innerHTML.
On following page innerHTML fails 2 times:
http://gml-modul.sourceforge.net/cgi-bin/gmL?domain=dhtml-tutorial&webpage=22
The parts, where the bug occures are marked with a bug icon.
This bug was also observed on the old implementation, which used IFRAME tags
instead of PRE tags with server side inclusion of the content.
This bug is also present in Mozilla 0.9.7
Reporter | ||
Comment 2•24 years ago
|
||
Hm, sounds really like a duplicate of bug 89780. In my case the LF characters are
dropped. There are no CR characters to drop, because the files are created on a
Linux system. I don't know what would happen, if line termination is done with CR
LF, because neither my old Mac editors nor my old Linux editors support that
format.
Comment 3•24 years ago
|
||
So Georg, to dup or not to dup, that is the question :-)
![]() |
||
Comment 4•23 years ago
|
||
Confirming, but adding dependency...
Comment 5•23 years ago
|
||
testcase?
Reporter | ||
Comment 6•23 years ago
|
||
If the bug is fixed, then the stylesheet sample code should be colored (syntax
hiliting).
Reporter | ||
Comment 7•23 years ago
|
||
With this build the testcase works well:
Mozilla 1.2b
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021030
Reporter | ||
Comment 8•23 years ago
|
||
With this one it works well too
Mozilla 1.3a
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021123
Comment 10•22 years ago
|
||
Marking WFM per Reporters comment.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Comment 11•22 years ago
|
||
This bug isn't resolved. I'm attaching a test case to illustrate. Since the
behavior is completely different, I don't think this is a dupe of 89780, though
it may be related.
Comment 12•22 years ago
|
||
Create a <select> control and add newline-separated text to it via
document.write(). Compare the control's innerHTML to the content that was
written into the document.
Comment 13•22 years ago
|
||
Create a <select> control and add newline-separated text to it via
document.write(). Compare the control's innerHTML to the content that was
written into the document.
Comment 14•22 years ago
|
||
Create a <select> control and add newline-separated text to it via
document.write(). Compare the control's innerHTML to the content that was
written into the document.
Comment 15•22 years ago
|
||
Argh...sorry for the spam.
See also bug #100175.
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•