Closed
Bug 63104
Opened 25 years ago
Closed 25 years ago
</script> shown as </</script> in view source
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
VERIFIED
FIXED
People
(Reporter: bugs4hj, Assigned: harishd)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file)
416 bytes,
text/html
|
Details |
All build's after 2000121104 are changing the closing tag <script> into someting
like this: </</script>
Build 2000121104 is ok on WinNT4 Sp6b later builds are making a mess of it!
Might this has enything to do with displaying text at rendering of documents?
I have inserted a <\/script> in this example. Don't care, that one is ok!
Also Netscape6/6.0 is having no problems with this! This might be the case that
text pops up on your screen! Is the parser getting drunk of this typo?
Keywords: regression
![]() |
||
Comment 3•25 years ago
|
||
I see this on linux CVS build 2000-12-15. In the view source window, </script>
tags are shown as </</script>
All other closing tags are displayed correctly. OS->All
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
Summary: Regression: closing tag </script> gets into </</script> → </script> shown as </</script> in view source
Comment 5•25 years ago
|
||
Proposed fix (OK, it got checked in by mistake):
Index: nsHTMLTokenizer.cpp
===================================================================
RCS file: /cvsroot/mozilla/htmlparser/src/nsHTMLTokenizer.cpp,v
retrieving revision 3.73
retrieving revision 3.74
diff -u -r3.73 -r3.74
--- nsHTMLTokenizer.cpp 2000/12/18 20:44:09 3.73
+++ nsHTMLTokenizer.cpp 2000/12/18 20:58:53 3.74
@@ -717,12 +717,15 @@
//if((eHTMLTag_style==theTag) || (eHTMLTag_script==theTag)) {
if(gHTMLElements[theTag].CanContainType(kCDATA)) {
- nsAutoString endTag; endTag.AssignWithConversion(nsHTMLTags::GetStrin
gValue(theTag));
- endTag.InsertWithConversion("</",0,2);
+ nsAutoString endText, endTagName;
+ endTagName.AssignWithConversion(nsHTMLTags::GetStringValue(theTag));
+ endText.Assign(endTagName);
+ endText.InsertWithConversion("</",0,2);
+
CToken* textToken=theAllocator->CreateTokenOfType(eToken_text,eHTMLTa
g_text);
- result=((CTextToken*)textToken)->ConsumeUntil(0,PRBool(theTag!=eHTMLT
ag_script),aScanner,endTag,mParseMode,aFlushTokens); //tell new token to finish
consuming text...
- //endTag.Append(">");
- CToken* endToken=theAllocator->CreateTokenOfType(eToken_end,theTag,en
dTag);
+ result=((CTextToken*)textToken)->ConsumeUntil(0,PRBool(theTag!=eHTMLT
ag_script),aScanner,endText,mParseMode,aFlushTokens); //tell new token to finis
h consuming text...
+
+ CToken* endToken=theAllocator->CreateTokenOfType(eToken_end,theTag,en
dTagName);
AddToken(textToken,result,&mTokenDeque,theAllocator);
AddToken(endToken,result,&mTokenDeque,theAllocator);
}
Comment 6•25 years ago
|
||
Fix checked in on 12/18/2000.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Will have to teach ConsumeUntil() to not depend on '</' - I'll do that later.
But for now Vidur's patch looks good to me. r=harishd
Comment 9•25 years ago
|
||
verified:
2001-02-05-09-Mtrunk : Win32
2001-02-05-11-Mtrunk : Linux
2001-02-05-12-Mtrunk : Mac
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•