Question

Problem I'm trying to escape & so that I can use js to redirect the user

Code

//first try
location.replace('//<xsl:call-template name="domainLocator"></xsl:call-template><xsl:value-of select="$dotNetAppFolder" />/Display?page=splash_device&xpf=android');
//second try
<xsl:text disable-output-escaping="yes" >/Display?page=splash_device&xpf=android</xsl:text>

Desired Outcome

web/Display?page=splash_device&xpf=android

So, the problem seems simple to me, I just want to escape the & so my page won't throw an error.

NB: Also, I know this question has been asked before, but there was no accepted question and it is 4 years old. Thought somebody must know an answer or if its not possible.

Was it helpful?

Solution

This think this is a simple one.

Try using:

&amp; 

instead of:

&

Hope that helps!

OTHER TIPS

There is no way to include & within xslt currently. Sadly I had to strip it all out

location.replace('//<xsl:call-template name="domainLocator"><xsl:with-param name="version" select="'desktop'" /></xsl:call-template>');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top