[xsl] adding escaping slashes

Subject: [xsl] adding escaping slashes
From: Joe Stump <joe@xxxxxxxxxxxx>
Date: Wed, 29 Jun 2005 16:12:11 -0700
I've got some text (ie. <b>Joe's Diner</b>) that needs to be translated into something along the lines of the following:

<a onClick="doSomething('Joe\'s Diner');">Joe's Diner</a>

I've got everything working, but how to do the equivalent of PHP's addslashes() to the text() of an element is causing me some problems. Anyone have any ideas how to add escaping slashes to a text node?

Thanks!

--Joe

Current Thread