This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: %20 in href attribute]


When use a variable with string value, which contains spaces after the 
#, as the value of href attribute to the <a> tag, the transformer 
automatically replaces the spaces with %20 and causes the link not 
recognize the anchor in the targeting page.  Is there a work around for 
that?  Sample code as follow:

<xsl:variable name="url" select="$urlink/@url"/>
<a href="{$url}" target="ext_link" onclick="new_win()"><xsl:value-of 
select="$title"/></a>

href value desired: 
http://www.state.ma.us/dhcd/components/dns/HtOHA.htm#About Our Programs
what I got: 
http://www.state.ma.us/dhcd/components/dns/HtOHA.htm#About%20Our%20Programs

Thank you,
Yan Yi Huang



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]