https://bugzilla.wikimedia.org/show_bug.cgi?id=42248

       Web browser: ---
             Bug #: 42248
           Summary: Only omit auto-closed end tags from serialization if
                    auto-closing context is unchanged
           Product: Parsoid
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JS/serializer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---


We now mark TreeBuilder- and QuoteTransformer-closed elements with the
autoInsertedEnd flag in data-parsoid. The serializer then omits those end tags
from serialization.

Currently the serializer does this unconditionally, even if the auto-closing
context has changed as in this example:

{|
| ''italic
|}

The DOM produced includes an </i> tag. An editor can append content to the
table cell after the italic content, which would then wrongly be included in
the italic element after serialization:

{|
| ''italic new non-italic content
|}

The serializer needs to be smarter about these context changes, and should emit
the close tag when needed. In this case, the correct result would be:

{|
| ''italic'' new non-italic content
|}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to