W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

parse attributes problem

From: Andrea Sparling <asparling@adrelevance.com>
Date: Tue, 06 Jun 2000 09:00:24 -0700
Message-ID: <393D2018.F0F19680@adrelevance.com>
To: html-tidy@w3.org
If a bit of unknown code is in the attribute list, such as an editor
relic ( ; )
<a href="http://www.someplace.htm" target="mainWindow" ;>
there is an unhandled exception with:
Report.attrError(this, this.token, value, Report.BAD_ATTRIBUTE_VALUE);

The logic was
if (attribute != null && isValidAttrName(attribute))
 {
                av = new AttVal( list, null, null, null,
                                 delim.value, attribute, value );
                av.dict =
                   
AttributeTable.getDefaultAttributeTable().findAttribute(av);
                list = av;
 }
 else
 {
                av = new AttVal( null, null, null, null,
                                 0, attribute, value );
                Report.attrError(this, this.token, value,
Report.BAD_ATTRIBUTE_VALUE);
  }


 The editor relic ; is not null but is not valid, the && makes it fall
thru to
the error clause.

 It should probably be treated as whitespace. I have found several
editor relics in
 the  pages that I have been investigating. The C tidy does not have
this problem.
Received on Tuesday, 6 June 2000 12:01:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT