Bugfix for Foundry: Absolute URLs in the href attribute of a <link> element did not work

git-svn-id: https://svn.libreccm.org/ccm/trunk@5017 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2017-09-28 09:51:22 +00:00
parent 8b4f093664
commit 018b2b243f
1 changed files with 8 additions and 1 deletions

View File

@ -1677,7 +1677,14 @@
<xsl:with-param name="copy-attributes" select="'crossorigin rel rev media hreflang type sizes'" />
</xsl:call-template>
<xsl:if test="./@href">
<xsl:choose>
<xsl:when test="starts-with(./@href, 'http://') or starts-with(./@href, 'https://')">
<xsl:attribute name="href" select="./@href" />
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href" select="foundry:gen-path(./@href)" />
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</link>
</xsl:template>