bug 299036: Fix crash in CNavDTD by moving newline stripping into the tokenizer. This reduces our reliance on the invariants that the tokenizer tries to provide. r+sr=jst a=chofmann
git-svn-id: svn://10.0.0.236/trunk@175279 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -872,8 +872,7 @@ nsresult nsHTMLTokenizer::ConsumeStartTag(PRUnichar aChar,
|
||||
if (isCDATA) {
|
||||
// The only tags that consume conservatively are <script> and
|
||||
// <style>, the rest all consume until the end of the document.
|
||||
result = textToken->ConsumeCharacterData(0,
|
||||
theTag==eHTMLTag_script ||
|
||||
result = textToken->ConsumeCharacterData(theTag==eHTMLTag_script ||
|
||||
theTag==eHTMLTag_style,
|
||||
theTag!=eHTMLTag_script,
|
||||
aScanner,
|
||||
@@ -888,12 +887,13 @@ nsresult nsHTMLTokenizer::ConsumeStartTag(PRUnichar aChar,
|
||||
else if (isPCDATA) {
|
||||
// Title is consumed conservatively in order to not regress
|
||||
// bug 42945
|
||||
result = textToken->ConsumeParsedCharacterData(0,
|
||||
theTag==eHTMLTag_title,
|
||||
aScanner,
|
||||
endTagName,
|
||||
mFlags,
|
||||
done);
|
||||
result = textToken->ConsumeParsedCharacterData(
|
||||
theTag==eHTMLTag_textarea,
|
||||
theTag==eHTMLTag_title,
|
||||
aScanner,
|
||||
endTagName,
|
||||
mFlags,
|
||||
done);
|
||||
|
||||
// Note: we *don't* set aFlushTokens here.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user