RE: [xsl] : Escaping '&' in an HTML link.

Subject: RE: [xsl] : Escaping '&' in an HTML link.
From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
Date: Mon, 30 Jul 2001 14:45:21 -0700
You're correct, the HTTP rules require you to escape an "&" character.  Just
as you replaced each space by "+", you need to replace each "&" by "%26".
This would mean that you would have to call a template to do this
replacement before sending the translated string to the output, since there
is no built-in support for URL encoding in XSLT.  However, I believe you may
find that code in the EXSLT project, which you can access via, under the name of str:replace.


-----Original Message-----
From: Aparna Joshi [mailto:aparna.joshi@xxxxxxxxxx]
Sent: July 30, 2001 14:03
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] : Escaping '&' in an HTML link.


Here is my stylesheet (basic structure):


But this link fails when it encounters a value with "&" in it e.g.
Star&Bucks fails because of the '&' in between.
Is there any to escape the '&' so that the URL is completely and properly
I tried "disable-output-escaping" but it didnot seem to work.

Thanks in anticipation for any help provided.


 XSL-List info and archive:

Current Thread