Closed
Bug 191327
Opened 22 years ago
Closed 21 years ago
Make internal subset not include delimiting brackets
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.4alpha
People
(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)
Details
Attachments
(1 file, 1 obsolete file)
2.52 KB,
patch
|
harishd
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
Currently our internalSubset includes the delimiting brackets. I just noticed that DOM 3 says they should not be there. Should we fix things? What do other browsers do? DOM Level 2 Core on internalSubset does not define what happens with brackets: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-412266927 DOM Level 3 Core says brackets are not included: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-412266927
Comment 1•22 years ago
|
||
Both link was same and I try to find difference :-). Second link should be http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-412266927
Assignee | ||
Comment 2•22 years ago
|
||
Doh! Thanks. Actually here are directs link to internalSubset: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-Core-DocType-internalSubset http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-internalSubset
Assignee | ||
Comment 3•21 years ago
|
||
Contains also fix for bug 191482
Assignee | ||
Comment 4•21 years ago
|
||
Attachment #116220 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #116221 -
Flags: superreview?(peterv)
Attachment #116221 -
Flags: review?(harishd)
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [fixinhand]
Target Milestone: --- → mozilla1.4alpha
Comment on attachment 116221 [details] [diff] [review] one that actually compiles... >Index: htmlparser/src/nsExpatDriver.cpp >=================================================================== >RCS file: /cvsroot/mozilla/htmlparser/src/nsExpatDriver.cpp,v >+ mDoctypeText.SetLength(mDoctypeText.Length() - 1); >+ mDoctypeText.Cut(0, 1); Replace SetLength with Truncate. With that r=harishd
Attachment #116221 -
Flags: review?(harishd) → review+
Updated•21 years ago
|
Attachment #116221 -
Flags: superreview?(peterv) → superreview+
Comment 6•21 years ago
|
||
Comment on attachment 116221 [details] [diff] [review] one that actually compiles... - In nsExpatDriver.cpp: // The rest is the internal subset (minus whitespace) mDoctypeText.Trim(kWhitespace); + // And take out the brackets too + mDoctypeText.SetLength(mDoctypeText.Length() - 1); + mDoctypeText.Cut(0, 1); mInternalState = mSink->HandleDoctypeDecl(mDoctypeText, name, ... mDoctypeText.Cut(0, 1) is rather expensive if there's more than a little text in the doctype (which is not uncommon), how about this in stead: + // And take out the brackets too + + const nsAString& substr = Substring(mDoctypeText, 1, + mDoctypeText.Length() - 2); + mInternalState = mSink->HandleDoctypeDecl(substr, name, ... Do we need to verify that mDoctypeText is at least 2 characters long here before running the above code? Please make this change before landing this.
Assignee | ||
Comment 7•21 years ago
|
||
Note to self: always remember Substring. Yeah, I'll make that change, thanks. We probably need to check that length >= 2, so I'll make that change just in case.
Assignee | ||
Comment 8•21 years ago
|
||
Checking in content/base/src/nsXMLContentSerializer.cpp; /cvsroot/mozilla/content/base/src/nsXMLContentSerializer.cpp,v <-- nsXMLConten tSerializer.cpp new revision: 1.34; previous revision: 1.33 done Checking in htmlparser/src/nsExpatDriver.cpp; /cvsroot/mozilla/htmlparser/src/nsExpatDriver.cpp,v <-- nsExpatDriver.cpp new revision: 3.34; previous revision: 3.33 done Checking in expat/xmlparse/xmlparse.c; /cvsroot/mozilla/expat/xmlparse/xmlparse.c,v <-- xmlparse.c new revision: 1.25; previous revision: 1.24 I noticed that the serializer part of the patch was not exactly correct, fixed that too before checkin in.
Assignee | ||
Comment 9•21 years ago
|
||
Should have been marked fixed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Whiteboard: [fixinhand]
Comment 10•21 years ago
|
||
Heikki: Is it possible that the fix for this, or bug 191482, is the cause of bug 197477 ? Note that the description for bug 197477 is misleading; the XML parser barfs on © anywhere, not just Help->About Mozilla
Comment 11•21 years ago
|
||
Re comment 10: No, it's not. Right file, wrong bug, bug 194240 was the one.
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•