Closed Bug 106543 Opened 23 years ago Closed 23 years ago

Remove useless code in tokenizer

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
minor

Tracking

()

VERIFIED INVALID

People

(Reporter: choess, Assigned: harishd)

Details

Attachments

(1 file)

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.
Christopher: err those links are not valid...
Nope, still not valid. I'm getting "This file does not exist."
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.


Oops, it turns out we need this for XML view source (thanks, Clarence!). Closing
INVALID.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Verified invalid per Comment #7
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: