help3xsl/get_bookmark.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit fb9c746f6aaae147aa16b1f2b682e01d07003d03 Author: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> AuthorDate: Fri Oct 22 12:15:06 2021 +0300 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Sat Oct 23 19:59:25 2021 +0200 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.hal...@libreoffice.org> diff --git a/help3xsl/get_bookmark.xsl b/help3xsl/get_bookmark.xsl index 05121e23f..9700e4d57 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["},]]>
</xsl:text> </xsl:for-each> </xsl:for-each>