Re: Tidy bug (malformed URI reference)

* Charles Reitzel wrote:
>>Indeed, so authors should avoid using spaces or non-ASCII characters in
>>URIs, no matter what scheme.
>
>"Don't do that" is hardly consistent with Tidy's goal of fixing up markup, 
>is it?  We usually only resort to that answer when faced with a 
>functionality conflict or sheer difficulty.  We have neither in this case.

There are two ways to fix the markup, remove the spaces or escape the
spaces. Removing them is impossible without a proper JavaScript parser
that tells Tidy whether the space is significant or not, we don't have
such JavaScript parser. So Tidy must escape the spaces. That's what Tidy
does. If you don't want Tidy to fix URI attribute values, you can use
the --fix-uri config option. I don't see why 'javascript' URIs should be
made a special case and Tidy should output invalid documents by default
when it is able to fix the document.

Received on Thursday, 5 December 2002 13:02:53 UTC