[Webkit-unassigned] [Bug 156285] New: Newlines lost in .innerHTML serialization of <pre> when first character is a newline

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 6 03:43:52 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=156285

            Bug ID: 156285
           Summary: Newlines lost in .innerHTML serialization of <pre>
                    when first character is a newline
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zcorpan at gmail.com

The HTML spec says

> If current node is a pre, textarea, or listing element, and the first child node of the element, if any, is a Text node whose character data has as its first character a U+000A LINE FEED (LF) character, then append a U+000A LINE FEED (LF) character.

https://html.spec.whatwg.org/#html-fragment-serialisation-algorithm

This is because otherwise it doesn't round-trip correctly if the data starts with a LF.

See https://github.com/whatwg/html/issues/944

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160406/e8121e17/attachment.html>


More information about the webkit-unassigned mailing list