Open Bug 49551 Opened 24 years ago Updated 1 year ago

when extraneous </script> is encountered, explain bug 32618

Categories

(Core :: DOM: HTML Parser, enhancement, P5)

enhancement

Tracking

()

Future

People

(Reporter: jruderman, Unassigned)

References

(Depends on 1 open bug)

Details

so that people don't keep reporting mozilla's correct behavior of interpreting document.write("</script">) as the end of a script let's report an error to the user. (see bug 18324, bug 21944, bug 26857, bug 32618, and bug 49449) mozilla encountered an extraneous </script>. this often happens when webpage authors forget to escape the string "</script>" as "<\/script>" within a script, since some older browsers (including older versions of netscape (?)) incorrectly pretended that it was escaped anyway. for more information see http://bugzilla.mozilla.org/show_bug.cgi?id=32618. this is a special case of bug 6211.
Dividing up claytons bugs to triage.
Assignee: clayton → kmcclusk
Blocks: 51484
massive update for QA contact.
QA Contact: petersen → lorca
Harish, is this an error that the parser can emit?
Assignee: kmcclusk → harishd
This falls under nice to have category..not a "must have". Marking FUTURE.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Reassigning QA Contact for all open and unverified bugs previously under Lorca's care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
qa contact updated.
QA Contact: gerardok → bsharma
SPAM. HTML Element component deprecated, changing component to Layout. See bug 88132 for details.
Component: HTML Element → Layout
Component: Layout → Parser
QA Contact: bsharma → moied
The whole point is that we don't know it's an extraneous </script>. If we did, we'd just skip over it. I feel this should be wontfix -- error reporting in the HTML parser just isn't going to happen, imo.
If a page has <script> document.write("</script>"); </script> then when the parser reaches the *second* </script>, there won't be a <script> open, so it's clearly an extraneous </script>.
Oh, so the real message you want output is "stray </script> tag encountered at line X" (when the real error was at line Y)? Even doing that in the current parser "architecture" is probably more trouble than it's worth (especially given that error messages with unhelpful line numbers aren't worth much).
Assignee: harishd → nobody
Status: ASSIGNED → NEW
QA Contact: moied → parser
Depends on: 512229

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority and severity.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.