summaryrefslogtreecommitdiff
path: root/help3xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-10 23:18:27 -0200
committerJan Holesovsky <kendy@collabora.com>2018-08-07 17:51:08 +0200
commit177660b1e4d7dd9960ad56d6c273095d01b0a015 (patch)
tree7220187f84a0cfd220104fff013254213bfd4dec /help3xsl
parent064f593cf44f74ddbd99eea50096f3d90e80e65b (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>