Skip to content

Commit

Permalink
fix atom content/summary parsing (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliendavid committed Jan 2, 2019
1 parent 1e65cb4 commit 2d6ec3e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"manifest_version": 2,
"name": "RSSPreview",
"version": "2.3.2",
"version": "2.4",
"author": "Aurelien David",
"homepage_url": "https://github.com/aureliendavid/rsspreview",

Expand Down
17 changes: 14 additions & 3 deletions rss.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@

<div class="lastUpdated"><xsl:value-of select="pubDate | atom:updated | rss1:pubDate" /></div>
</h3>
<div class="feedRawContent" desctype="{atom:content/@type}">
<xsl:copy-of select="description | atom:summary | atom:content | rss1:description" />
</div>

<xsl:choose>
<xsl:when test="atom:summary">
<div class="feedRawContent" desctype="{atom:summary/@type}">
<xsl:copy-of select="atom:summary" />
</div>
</xsl:when>
<xsl:otherwise>
<div class="feedRawContent" desctype="{atom:content/@type}">
<xsl:copy-of select="description | atom:content | rss1:description" />
</div>
</xsl:otherwise>
</xsl:choose>

<div class="enclosures">
<xsl:for-each select="enclosure | atom:link[@rel='enclosure'] | rss1:enclosure">

Expand Down

0 comments on commit 2d6ec3e

Please sign in to comment.