[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] URL escaping in HTML output


Subject: Re: [xsl] URL escaping in HTML output
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 9 Aug 2001 14:19:59 -0600 (MDT)

Joerg Pietschmann wrote:
> Hello All,
> using Saxon 6.4, i have an URL of
>  /foo?rel=bar/baz
> stuffed literally into the generated HTML code. Yes, it is a href
> attribute of an A element. While reading the URI RFCs i got the
> impression that the slash in the query string should have been
> escaped as %2F. Fortunately, none of the browsers or http servers
> i use has complained. Can somebody tell me whether i'm wrong or
> whether it is a bug in the processor?

The browsers and servers are being lenient, and the XSLT processor is not required to
analyze your href values beyond making sure they are entirely ASCII characters. "/" is in
the ASCII range so it won't get escaped for you, no matter where it appears. It's your
repsonsibility to make a proper URI reference before you put it in an href.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords