You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2014/01/23 12:20:34 UTC

svn commit: r1560640 - /httpd/httpd/trunk/docs/manual/style/latex/html.xsl

Author: nd
Date: Thu Jan 23 11:20:34 2014
New Revision: 1560640

URL: http://svn.apache.org/r1560640
Log:
add more escaping for urls

Modified:
    httpd/httpd/trunk/docs/manual/style/latex/html.xsl

Modified: httpd/httpd/trunk/docs/manual/style/latex/html.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/style/latex/html.xsl?rev=1560640&r1=1560639&r2=1560640&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/style/latex/html.xsl (original)
+++ httpd/httpd/trunk/docs/manual/style/latex/html.xsl Thu Jan 23 11:20:34 2014
@@ -261,14 +261,26 @@ interpreted in pre -->
 </xsl:variable>
 <xsl:choose>
 
-<xsl:when test="starts-with(@href, 'http:') or starts-with(@href, 'news:') or starts-with(@href, 'mailto:')">
+<xsl:when test="starts-with(@href, 'http:') or starts-with(@href, 'https:') or starts-with(@href, 'news:') or starts-with(@href, 'mailto:')">
   <xsl:if test="not(.=@href)">
     <xsl:text>\footnote{</xsl:text>
       <xsl:text>\href{</xsl:text>
       <xsl:call-template name="replace-string">
-        <xsl:with-param name="text" select="@href"/>
-        <xsl:with-param name="replace" select="'#'"/>
-        <xsl:with-param name="with" select="'\#'"/>
+        <xsl:with-param name="replace" select="'%'"/>
+        <xsl:with-param name="with" select="'\%'"/>
+        <xsl:with-param name="text">
+          <xsl:call-template name="replace-string">
+            <xsl:with-param name="replace" select="'_'"/>
+            <xsl:with-param name="with" select="'\_'"/>
+            <xsl:with-param name="text">
+              <xsl:call-template name="replace-string">
+                <xsl:with-param name="replace" select="'#'"/>
+                <xsl:with-param name="with" select="'\#'"/>
+                <xsl:with-param name="text" select="@href"/>
+              </xsl:call-template>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:with-param>
       </xsl:call-template>
       <xsl:text>}{</xsl:text>
     <xsl:call-template name="ltescape">