summaryrefslogtreecommitdiff
path: root/help3xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-10 23:18:27 -0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-11 02:31:15 +0100
commit2575baa6d1f20327dc943b1cc73ff4252f6cbfe6 (patch)
tree37015b2574068dd7bed73ca6d50afe1b6816a56b /help3xsl
parent01879555450189381cc02517433807056b193af8 (diff)
Fix HIDs with '?' inside
'?' interferes in logic to extract HID Change-Id: I5252d1cf861959cc6ad2b49afe9b19f4c9698f56 Reviewed-on: https://gerrit.libreoffice.org/47734 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r--help3xsl/get_url.xsl18
1 files changed, 10 insertions, 8 deletions
diff --git a/help3xsl/get_url.xsl b/help3xsl/get_url.xsl
index 1cff5f954e..f7a032749a 100644
--- a/help3xsl/get_url.xsl
+++ b/help3xsl/get_url.xsl
@@ -45,17 +45,19 @@ xsltproc get_bookmark.xsl <file.xhp>
//-->
<!-- Extract the bookmarks branches x filename-->
+<!--Special case for questions marks chars, that interferes in passing
+parameters in URLS-->
<xsl:template match="/">
<xsl:variable name="href" select="concat(substring-before($filename,'xhp'),'html')"/>
<xsl:for-each select="//bookmark[@branch!='index']">
- <xsl:if test="not(contains(@branch,'/.uno'))">
- <xsl:text>'</xsl:text>
- <xsl:value-of select="substring-after(@branch,'hid/')"/>
- <xsl:text>':'</xsl:text>
- <xsl:value-of select="$href" /><xsl:text>',&#xA;</xsl:text>
- </xsl:if>
+ <xsl:variable name="aux" select="substring-after(@branch,'hid/')"/>
+ <xsl:text>'</xsl:text>
+ <xsl:choose>
+ <xsl:when test="not(contains($aux,'?'))"><xsl:value-of select="$aux"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="concat(substring-before($aux,'?'),'%3F',substring-after($aux,'?'))"/></xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>':'</xsl:text>
+ <xsl:value-of select="$href"/><xsl:text>',&#xA;</xsl:text>
</xsl:for-each>
</xsl:template>
-
-
</xsl:stylesheet>