I am using output method="html" and trying to print a block of JavaScript. This JavaScript has an array variable that I need to place escaped HTML inside. Namely, XSLT chokes when I use a backslash character within my JavaScript variable. Here's a simplified version of my JavaScript that's inside my XSLT:
Code:
<script language="JavaScript1.2" type="text/javascript">
Text[0]=["<div style=\"padding:3px\">Dr. John Doe</div>"];
</script>
I've tried single quotes instead of \" but it doesn't work. I also tried using < and > but it doesn't work either because of how JavaScript handles things. Any ideas on how I can escape my double quotes inside JavaScript?
Thanks,
Steve