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 29106 - JavaScript is interpreted as HTML: logical operator "&&" is suggested to be written as "&&"
Summary: JavaScript is interpreted as HTML: logical operator "&&" is suggested to be w...
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-01 08:46 UTC by ----
Modified: 2015-09-01 08:46 UTC (History)
0 users

See Also:


Attachments

Description ---- 2015-09-01 08:46:24 UTC
PAGE USED TO GET THIS ISSUE
[2015-09-01]
http://www.datatermgruppen.se/component/option,com_chronocontact/Itemid,107/

EXAMPLE OF OUTPUT
Warning character X is the first character of a delimiter but occurred as data ✉
This message may appear in several cases:

You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 99, column 31: character "&" is the first character of a delimiter but occurred as data
			el.$tmp.myTitle = (el.href && el.getTag() == 'a') ? el.href.replace('http://…


SOURCE CODE THAT CAUSED THIS ISSUE
              1         2         3         4
     1234567890123456789012345678901234567890
  1: <!DOCTYPE ...>
  2: <html ...>
  3: <head>
     ...
 64: <script type="text/javascript">
     var ChronoTips = new Class({
 66:  options: {...},
 80:  initialize: function(elements, lasthope,options){...},

 98:  build: function(el){
>99:   el.$tmp.myTitle = (el.href && el.getTag() == 'a') ? el.href.replace('http://', '') : (el.rel || false);  <==
			if (el.title){...
      ...
183: </scrip>
493: </head>
     ...
495: <body>
     ...
797: </body>
798: </html>