[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: white space to + in query string

Subject: Re: white space to + in query string
From: "Jonathan Perret" <jonathan@xxxxxxxxxxxx>
Date: Thu, 14 Feb 2002 13:24:10 +0100
server.urlencode space
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.