]> granicus.if.org Git - docbook-dsssl/commitdiff
Problem:
authorMichael Smith <xmldoc@users.sourceforge.net>
Wed, 28 Sep 2005 02:23:47 +0000 (02:23 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Wed, 28 Sep 2005 02:23:47 +0000 (02:23 +0000)
Garbage characters appear in content of Title attribute in HTML
output.

Cause:
Contents of Alt element, including line breaks, were being copied
over "as is" to value of Title attribute in HTML output. Line
breaks in Title appear a garbage characters when displayed as
pop-up "tool text".

Fix:
Added call to normalize-space() when transforming content of Alt
for HTML output. Closes #1254532. Thanks to Sam Steingold for
reporting the problem.

xsl/html/html.xsl

index 400a9dd54756798612bab60152dce980c6a1a11c..15fd486e980da5823d71357c047e80fe83843ff0 100644 (file)
@@ -22,7 +22,7 @@
 <xsl:template name="generate.html.title">
   <xsl:if test="alt">
     <xsl:attribute name="title">
-      <xsl:value-of select="alt"/>
+      <xsl:value-of select="normalize-space(alt)"/>
     </xsl:attribute>
   </xsl:if>
 </xsl:template>