Subject: Re: [xsl] white space to + in query string From: "Jonathan Perret" <jonathan@xxxxxxxxxxxx> Date: Thu, 14 Feb 2002 13:24:10 +0100 |
You might want to check for more than just spaces, as e.g. non-ASCII characters (accented letters, for example) also need to be escaped. I hit the problem when I was generating GET queries based on the contents of database fields, e.g. : <a href="search.asp&name={@name}"> click here to search for <xsl:value-of select="@name" /> </a> I did not want to take any chances so I just defined an extension function that called Server.URLEncode - but of course there must be other means... Cheers, --Jonathan ----- Original Message ----- From: "Wendell Piez" <wapiez@xxxxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, February 13, 2002 4:32 PM Subject: Re: [xsl] white space to + in query string > If you're really paranoid (I should get extra Eudora hot peppers for saying > that -- huh, no....), you might want to normalize space before you do the > translate, to avoid extra "+" signs in your href: > > <a href="{translate(normalize-space(@some_attribute,' ','+'))}"> > > Cheers, > Wendell XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] white space to + in query, Wendell Piez | Thread | Re: [xsl] white space to + in query, Jeni Tennison |
RE: [xsl] alternate row color in a , jdgarrett | Date | Re: [xsl] white space to + in query, Jeni Tennison |
Month |