Skip to content

Commit 0e939e1

Browse files
authored
Merge pull request #1388 from isimluk/fix-link-to-rh-errata
Fix URL link mechanism for Red Hat Errata
2 parents 42ef3a2 + c142a76 commit 0e939e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

xsl/oval-to-xccdf.xsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ Authors:
8686
</xsl:template>
8787

8888
<xsl:template match="oval-def:reference[@source='RHSA']">
89-
<xsl:if test="starts-with(@ref_url, 'https://rhn.redhat.com/errata')">
90-
<xccdf:ident system="https://rhn.redhat.com/errata">
91-
<xsl:copy-of select="substring-before(substring-after(@ref_url, 'https://rhn.redhat.com/errata/'), '.html')"/>
89+
<xsl:if test="starts-with(@ref_url, 'https://access.redhat.com/errata')">
90+
<xccdf:ident system="https://access.redhat.com/errata">
91+
<xsl:copy-of select="substring-after(@ref_url, 'https://access.redhat.com/errata/')"/>
9292
</xccdf:ident>
9393
</xsl:if>
9494
</xsl:template>

xsl/xccdf-share.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Authors:
5555
<xsl:when test="starts-with(@system, 'http://cve.mitre.org')">
5656
<a href="{concat('https://cve.mitre.org/cgi-bin/cvename.cgi?name=', text())}"><abbr title="{concat(@system, concat(': ', text()))}"><xsl:value-of select="text()"/></abbr></a>
5757
</xsl:when>
58-
<xsl:when test="starts-with(@system, 'https://rhn.redhat.com/errata')">
59-
<a href="{concat('https://rhn.redhat.com/errata/', concat(text(), '.html'))}"><abbr title="{concat(@system, concat(': ', text()))}"><xsl:value-of select="text()"/></abbr></a>
58+
<xsl:when test="starts-with(@system, 'https://access.redhat.com/errata')">
59+
<a href="{concat('https://access.redhat.com/errata/', concat(text(), '.html'))}"><abbr title="{concat(@system, concat(': ', text()))}"><xsl:value-of select="text()"/></abbr></a>
6060
</xsl:when>
6161
<xsl:otherwise>
6262
<abbr title="{concat(@system, concat(': ', text()))}"><xsl:value-of select="text()"/></abbr>

0 commit comments

Comments
 (0)