Closed
Bug 106543
Opened 23 years ago
Closed 23 years ago
Remove useless code in tokenizer
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
VERIFIED
INVALID
People
(Reporter: choess, Assigned: harishd)
Details
Attachments
(1 file)
939 bytes,
patch
|
Details | Diff | Splinter Review |
At <URL:http://lxr.mozilla.org/mozilla/htmlparser/src/nsHTMLParser.cpp#554>, we check for non-ASCII Unicode characters in end tags, supposedly so we don't choke on XHTML served as text/html. However, at <URL:http://lxr.mozilla.org/mozilla/htmlparser/src/nsHTMLParser.cpp#582>, we don't deal with these characters in start tags. Since backwards-compatible XHTML (text/html) shouldn't have tags with Unicode in them, anyway, that part of the conditional on line 554 should be removed.
Reporter | ||
Comment 2•23 years ago
|
||
Make that <URL:http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLParser.cpp#554> and <URL:http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLParser.cpp#582>.
Reporter | ||
Comment 4•23 years ago
|
||
OK, brain engaged now. <URL:http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLTokenizer.cpp#554> and <URL:http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsHTMLTokenizer.cpp#582> Sorry! (need sleep...)
551 // xml allow non ASCII tag name, consume as end tag. need to make xml view source work 552 PRBool isXML=(mFlags & NS_IPARSER_FLAG_XML); 553 if(nsCRT::IsAsciiAlpha(theNextChar)||(kGreaterThan==theNextChar)|| 554 (isXML && (! nsCRT::IsAscii(theNextChar)))) { I'm guessing that the XML comment is no longer true. Removing line 551, line 552 and line 554 should do it I would think.
Reporter | ||
Comment 7•23 years ago
|
||
Oops, it turns out we need this for XML view source (thanks, Clarence!). Closing INVALID.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•