aviationweather.gov - </script> tag inside of javascript string literal terminates <script> tag

RESOLVED INVALID

Status

RESOLVED INVALID
16 years ago
4 years ago

People

(Reporter: blizzard, Unassigned)

Tracking

unspecified

Details

(URL)

(Reporter)

Description

16 years ago
The url above doesn't work properly.  You see a lot of script garbage at the top
of the page and a javascript error:

Error: unterminated string literal
Source File: http://aviationweather.gov/awc/pireps/menu.html
Line: 27, Column: 11
Source Code:
	output += "<script language=\"JavaScript\">setTimeout('close()',12000)

Line 27 is actually this:

	output += "<script language=\"JavaScript\">setTimeout('close()',12000)</script>";

and if you look at it in the view source window, the </script> is highlighted as
is the rest of the script text.  This indicates to me that the </script> tag is
probably being interpreted as the end of the actual script, not included in the
string literal.
Um, that's precisely per spec. We don't want the HTML parser to have to kknow
all about Javascript (CSS, VBScript...) as well as HTML syntax; end-tags inside
of <script> and <style> should be escaped. ->Evangelism
Assignee: harishd → bc
Component: Parser → US Gov
Product: Browser → Tech Evangelism
QA Contact: dsirnapalli → chrisn
Version: Trunk → unspecified
(Reporter)

Comment 2

16 years ago
At the same time, IE and konq have no problem with this, even if it's ill formed
(and I still think that it's questionable if it is.)

Updated

16 years ago
Summary: </script> tag inside of javascript string literal terminates <script> tag → aviationweather.gov - </script> tag inside of javascript string literal terminates <script> tag

Comment 3

16 years ago
tech evang june 2003 reorg
Assignee: bc → english-us
Component: US Gov → English US
QA Contact: chrisn → english-us

Comment 4

15 years ago
contact info  webawc@awc.kc.noaa.gov
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Oct
(Reporter)

Comment 6

15 years ago
I've sent email to that account, let's see if they fix it (the page hasn't been
changed in a long time.)
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.