Closed Bug 1259723 Opened 8 years ago Closed 8 years ago

innerHTML needs a smarter serializer for <pre>

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 838954

People

(Reporter: annevk, Unassigned)

Details

See http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3504. Per the HTML Standard innerHTML needs to insert an additonal LF if the contents of <pre> start with LF. Otherwise each time you roundtrip you lose an LF since the HTML parser eats them.
We explicitly decided to not do this at some point.
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsContentUtils.cpp?rev=604a180b6cc0#8606

Is any browser doing this, or is this actually a spec bug?
Presto does this FWIW. I don't think it caused any Web compat problems. I have some tests I can submit to web-platform-tests too (note to self: CORE-23623).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.