summaryrefslogtreecommitdiff
path: root/help3xsl/get_bookmark.xsl
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2021-10-22 12:15:06 +0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2021-10-23 19:59:25 +0200
commitfb9c746f6aaae147aa16b1f2b682e01d07003d03 (patch)
treeaac98c1185f8ea97457858593c1a703ec963afe8 /help3xsl/get_bookmark.xsl
parent2c0d02652166d4baf168f233459df09138ddc268 (diff)
tdf#145232 get_bookmark.xsl: Use normalize-space()
normalize-space() trims whitespace from the start and end of a string and collapses multiple spaces inside a string into a single space. This will prevent newlines in strings from breaking our generated bookmarks.js. Change-Id: I2a420cfd9fe13ee063151af79cb51b0ae49f5a0d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124056 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/get_bookmark.xsl')
-rw-r--r--help3xsl/get_bookmark.xsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/help3xsl/get_bookmark.xsl b/help3xsl/get_bookmark.xsl
index 05121e23fa..9700e4d57a 100644
--- a/help3xsl/get_bookmark.xsl
+++ b/help3xsl/get_bookmark.xsl
@@ -56,7 +56,7 @@ xsltproc get_bookmark.xsl <file.xhp>
<xsl:text disable-output-escaping="yes"><![CDATA[", app:"]]></xsl:text>
<xsl:value-of select="$app"/>
<xsl:text disable-output-escaping="yes"><![CDATA[", text:"]]></xsl:text>
- <xsl:call-template name="replace"><xsl:with-param name="text" select="."/></xsl:call-template>
+ <xsl:call-template name="replace"><xsl:with-param name="text" select="normalize-space(.)"/></xsl:call-template>
<xsl:text disable-output-escaping="yes"><![CDATA["},]]>&#xA;</xsl:text>
</xsl:for-each>
</xsl:for-each>