Closed
Bug 1363658
Opened 7 years ago
Closed 7 years ago
Serializing DocumentType (doctype) nodes should not include the internal subset
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: foolip, Assigned: ayg)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36 Steps to reproduce: https://github.com/w3c/web-platform-tests/pull/5648 This PR added this test: https://github.com/w3c/web-platform-tests/blob/master/domparsing/DOMParser-parseFromString-xml-internal-subset.html http://w3c-test.org/domparsing/DOMParser-parseFromString-xml-internal-subset.html Actual results: assert_equals: serialized doctype expected "<!DOCTYPE foo>" but got "<!DOCTYPE foo [ <!ENTITY x \"y\"> ]>" Expected results: This test should pass, because the internal subset isn't mentioned in https://w3c.github.io/DOM-Parsing/#xml-serializing-a-documenttype-node
Updated•7 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Comment 1•7 years ago
|
||
Henri would probably know what goes run in our code. :)
Flags: needinfo?(hsivonen)
Priority: -- → P3
Comment 2•7 years ago
|
||
https://searchfox.org/mozilla-central/source/dom/base/nsXMLContentSerializer.cpp#368 We really should should rewrite our serializers in Rust to get rid of a whole bunch of stuff that's meant for editors and is unnecessary for a browser. The editor-oriented stuff should really live in the BlueGriffon tree instead of m-c.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(hsivonen)
Comment hidden (mozreview-request) |
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8893372 [details] Bug 1363658 - Serializing doctypes should omit internal subset; https://reviewboard.mozilla.org/r/164474/#review170160 ::: commit-message-52285:7 (Diff revision 1) > + > +Changes to match spec, Chrome, and Safari. The spec was discussed and > +is what we want -- we already expand entities from the internal subset > +when parsing, so there's no need to remember their definitions. Indeed > +it seems like it would make sense to alter the parser to throw away the > +internal subset entirely at the end of parsing. Please file a follow-up to that effect. Has the DOM spec been changed not to expose the internal subset?
Attachment #8893372 -
Flags: review?(hsivonen) → review+
Assignee | ||
Comment 5•7 years ago
|
||
The DOM spec hasn't contained internalSubset for ages: https://dom.spec.whatwg.org/#dom-documenttype-internalsubset And we removed it in bug 801545 close to two years ago.
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Pushed by ayg@aryeh.name: https://hg.mozilla.org/integration/autoland/rev/3594bfc41c25 Serializing doctypes should omit internal subset; r=hsivonen
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3594bfc41c25
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•