<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl"
- xsl:extension-element-prefixes="php"
exclude-result-prefixes="php">
<xsl:param name="generate-enclosure"/>
<!-- Identity transform -->
<xsl:template match="@*|node()">
<xsl:copy>
+ <!--
+ Strip the style attribute while copying elements because it may be
+ dangerous, see:
+ https://validator.w3.org/feed/docs/warning/DangerousStyleAttr.html
+ -->
<xsl:apply-templates select="@*[not(name() = 'style')]|node()"/>
</xsl:copy>
</xsl:template>
<xsl:variable name="item-permalink" select="concat($BaseURL, .//div[@data-permalink-path]/@data-permalink-path)"/>
<xsl:variable name="item-has-video" select="$item-media//*[contains(@class, 'PlayableMedia--video')]"/>
+ <xsl:variable name="item-has-gif" select="$item-media//*[contains(@class, 'PlayableMedia--gif')]"/>
<item>
<title>
<xsl:value-of select="concat($user-name, ': ')"/>
<xsl:text> (Video)</xsl:text>
<xsl:element name="br"/>
</xsl:if>
+ <xsl:if test="$item-has-gif">
+ <xsl:text> (GIF)</xsl:text>
+ <xsl:element name="br"/>
+ </xsl:if>
<xsl:element name="span">
<xsl:attribute name="style">white-space: pre-wrap;</xsl:attribute>
<xsl:apply-templates select="$item-content/node()"/>