Re: Tidy bug (malformed URI reference)

Unfortunately, this is a case of "damned if you do, damned if you 
don't".  Escaping regular URLs is necessary to get them to work properly in 
Netscape browsers.  However, you break Javascript embedded in href 
attributes.

FWIW, I couldn't find Javascript links <a href="javascript: ...">foo</a> 
described anywhere in the HTML spec.  So we may be in a gray area of 
compliance with the _Recommendation_.  Certainly, the W3C has a track 
record of playing fast and loose with URI attributes (think of XML Namespaces).

take it easy,
Charlie

At 03:04 AM 12/5/2002 +0100, Bjoern Hoehrmann wrote:

>* Hofmann Juergen (SaW/QSG1) * wrote:
> > In line 76 of the HTML-Source Tidy interpret the javascript
> > code as an URI reference. Further Tidy's-HTML-Output-File
> > is false (%20 instead of spaces).
>
>The "href" attribute of the "a" element must contain nothing but URI
>references, thus Tidy is right to interpret the value as beeing a URI
>references. URI references must not contain spaces, thus Tidy escapes
>the spaces in your javascript:... URI reference. This is not a bug. If
>you dislike what Tidy does to your URI, you can use the --fix-uri
>configuration option to avoid any escaping of the URI, but then your
>(X)HTML document will be invalid.

Received on Thursday, 5 December 2002 10:50:34 UTC