summaryrefslogtreecommitdiff
path: root/plugins.xsl
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2006-04-01 11:40:18 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2006-04-01 11:40:18 +0000
commit6850ec3d1c74ff309330c3410c3fce3d947986ca (patch)
tree5e99dab2684bf52b3c0c8c8c56fec9be36624307 /plugins.xsl
parente430cd53b02f6d37da6200ac81c89c588f99b089 (diff)
plugins.xsl: Do not display an origin link if origin does not start with http
Original commit message from CVS: * plugins.xsl: Do not display an origin link if origin does not start with http See #323798 * plugins.xsl: Do not display an origin link if origin does not start with http See #323798
Diffstat (limited to 'plugins.xsl')
-rw-r--r--plugins.xsl16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins.xsl b/plugins.xsl
index 8b71d77..9cf3dc4 100644
--- a/plugins.xsl
+++ b/plugins.xsl
@@ -123,10 +123,18 @@
<xsl:element name="term">origin</xsl:element>
<xsl:element name="listitem">
<xsl:element name="simpara">
- <xsl:element name="ulink">
- <xsl:attribute name="url"><xsl:value-of select="origin" /></xsl:attribute>
- <xsl:value-of select="origin" />
- </xsl:element>
+ <!-- only show origin as link if it starts with http -->
+ <xsl:choose>
+ <xsl:when test="substring(@href, 1, 4) = 'http'">
+ <xsl:element name="ulink">
+ <xsl:attribute name="url"><xsl:value-of select="origin" /></xsl:attribute>
+ <xsl:value-of select="origin" />
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="origin" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:element>
</xsl:element>
</xsl:element>