title: Single quote escaping a dynamic value-of string in XSLT 1.0
body: <p>I am defining a JavaScript variable from XSLT and am getting an error due to an unescaped string. I understand that I need to replace this to <code>&amp;apos;</code>, but I'm unsure how to do that in XSLT 1.0.</p>
  
  <p>XSLT example: </p>
  
  <pre><code>var currentComment = '&lt;xsl:value-of select="root/Reviews/Review/Comment" /&gt;';
  </code></pre>
  
  <p>Rendered javascript with unescaped single quote:</p>
  
  <pre><code>var currentComment = 'Let's test a string.',
  // Causing an error ------^
  </code></pre>