Skip to content

Commit

Permalink
Fix invalid XML in feed
Browse files Browse the repository at this point in the history
`post.content` contains HTML. Truncating it arbitrarily at 400 chars
could result in raw `&` characters for example to end up in the feed.

This commit simply strips HTML and then truncates.

Fixes quarkusio#213
  • Loading branch information
pascalw authored and gsmet committed Sep 6, 2019
1 parent 7037a94 commit abcac6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ layout: null
{{ post.url | prepend: site.url }}
</link>
<description>
{{ post.content | escape | truncate: '400' }}
{{ post.content | strip_html | truncate: '400' }}
</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<guid>
Expand Down

0 comments on commit abcac6f

Please sign in to comment.