This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3648 - The - -) is interpreted as - -> in javascript and breaks check
Summary: The - -) is interpreted as - -> in javascript and breaks check
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 critical
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-01 18:00 UTC by Ing. Philippe Thomassigny
Modified: 2006-09-04 01:04 UTC (History)
0 users

See Also:


Attachments

Description Ing. Philippe Thomassigny 2006-09-01 18:00:51 UTC
here is a *very* simple example showing the bug.
It happens on XHTML 1.0 transitional, i did not tried on other versions.
the --) into the javascript is interpreted as the end tag for comment instead of --> really at the end of the javascript, which break any html page that contains a "--" operator followed by a ")"

Thanks

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>Some title</title>
</head>
<body>
<script type="text/javascript">
<!--
for(i = to_fill.options.length; i >= 0; i--)
  alert(i);
// -->
</script>
</body>
</html>
Comment 1 Olivier Thereaux 2006-09-04 01:04:28 UTC
http://www.w3.org/TR/xhtml1/#C_4