Browse Source

Update valid characters for tags

There is no reason why a dash or a plus sign should not be allowed in a
tag name.
NEWTESTIMONIALPAGES
Reinhard Müller 8 months ago
parent
commit
aadc990a78
4 changed files with 9 additions and 9 deletions
  1. 2
    2
      build/xslt/fsfe_mainsection.xsl
  2. 2
    2
      build/xslt/get_tags.xsl
  3. 3
    3
      news/news.xsl
  4. 2
    2
      tools/xsltsl/feeds.xsl

+ 2
- 2
build/xslt/fsfe_mainsection.xsl View File

@@ -9,9 +9,9 @@

<ul class="taglist"><xsl:for-each select="/buildinfo/document/tags/tag">
<xsl:variable name="keyname"
select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')"/>
select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ /:','abcdefghijklmnopqrstuvwxyz_')"/>
<xsl:variable name="tagname"
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')"/>
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ /:','abcdefghijklmnopqrstuvwxyz_')"/>

<xsl:choose><xsl:when test="@key and .">
<li><a href="/tags/tagged-{$keyname}.html"><xsl:value-of select="."/></a></li>

+ 2
- 2
build/xslt/get_tags.xsl View File

@@ -12,8 +12,8 @@
<xsl:output method="text" encoding="UTF-8"/>

<xsl:template match="tag">
<!-- Output tag name, stripping some forbidden characters -->
<xsl:value-of select="translate(., ' .+-/:_', '')"/>
<!-- Output tag name, removing some forbidden characters -->
<xsl:value-of select="translate(., ' /:', '_')"/>
<!-- Output a blank -->
<xsl:text> </xsl:text>
<!-- Output tag label -->

+ 3
- 3
news/news.xsl View File

@@ -111,9 +111,9 @@
<xsl:template match="buildinfo/document/set/news/tags">
<xsl:for-each select="tag[not(. = 'front-page' or @key = 'front-page')]">
<xsl:variable name="keyname"
select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')" />
select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ /:','abcdefghijklmnopqrstuvwxyz_')" />
<xsl:variable name="tagname"
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')" />
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ /:','abcdefghijklmnopqrstuvwxyz_')" />
<xsl:choose>
<xsl:when test="@key and .">
<li><a href="/tags/tagged-{$keyname}.html"><xsl:value-of select="." /></a></li>
@@ -126,4 +126,4 @@
</xsl:otherwise></xsl:choose>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>

+ 2
- 2
tools/xsltsl/feeds.xsl View File

@@ -243,9 +243,9 @@
<!-- <xsl:apply-templates select="tags" /> /-->
<xsl:for-each select="tags/tag[not(. = 'front-page' or @key = 'front-page')]">
<xsl:variable name="keyname"
select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')" />
select="translate(@key,'ABCDEFGHIJKLMNOPQRSTUVWXYZ /:','abcdefghijklmnopqrstuvwxyz_')" />
<xsl:variable name="tagname"
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-_+ /','abcdefghijklmnopqrstuvwxyz')" />
select="translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ /:','abcdefghijklmnopqrstuvwxyz_')" />
<xsl:choose>
<xsl:when test="@key and .">
<li><a href="/tags/tagged-{$keyname}.html"><xsl:value-of select="." /></a></li>

Loading…
Cancel
Save