]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure single quotes are escaped in the JavaScript dynamic toc
authorNorman Walsh <ndw@nwalsh.com>
Sat, 19 Oct 2002 18:39:34 +0000 (18:39 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sat, 19 Oct 2002 18:39:34 +0000 (18:39 +0000)
slides/xsl/html/frames.xsl

index 687fc8faedbd18fddfd16acc4ae456278e2941c6..024d713b9c7d228573d98fbaeffb57182029cd5c 100644 (file)
@@ -1450,14 +1450,20 @@ function init() {
   <xsl:value-of select="$titlefoil.html"/>
   <xsl:text disable-output-escaping="yes">" target="foil"&gt;</xsl:text>
 
-  <xsl:choose>
-    <xsl:when test="titleabbrev">
-      <xsl:value-of select="titleabbrev"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="title"/>
-    </xsl:otherwise>
-  </xsl:choose>
+  <xsl:call-template name="string.subst">
+    <xsl:with-param name="string">
+      <xsl:choose>
+        <xsl:when test="titleabbrev">
+          <xsl:value-of select="titleabbrev"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="title"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:with-param>
+    <xsl:with-param name="target">'</xsl:with-param>
+    <xsl:with-param name="replacement">\'</xsl:with-param>
+  </xsl:call-template>
 
   <xsl:text disable-output-escaping="yes">&lt;/A&gt;&lt;/DIV&gt;</xsl:text>
   <xsl:text>');&#10;</xsl:text>