Skip to content

Commit 526c4b1

Browse files
committed
Merge pull request plusjade#269 from purp/escape_xml_in_feeds
escape all freeform text
2 parents a987295 + 1f3bcf2 commit 526c4b1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

atom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ title : Atom Feed
55
<?xml version="1.0" encoding="utf-8"?>
66
<feed xmlns="http://www.w3.org/2005/Atom">
77

8-
<title>{{ site.title }}</title>
8+
<title>{{ site.title | xml_escape }}</title>
99
<link href="{{ site.production_url }}/{{ site.atom_path }}" rel="self"/>
1010
<link href="{{ site.production_url }}"/>
1111
<updated>{{ site.time | date_to_xmlschema }}</updated>
1212
<id>{{ site.production_url }}</id>
1313
<author>
14-
<name>{{ site.author.name }}</name>
14+
<name>{{ site.author.name | xml_escape }}</name>
1515
<email>{{ site.author.email }}</email>
1616
</author>
1717

1818
{% for post in site.posts %}
1919
<entry>
20-
<title>{{ post.title }}</title>
20+
<title>{{ post.title | xml_escape }}</title>
2121
<link href="{{ site.production_url }}{{ post.url }}"/>
2222
<updated>{{ post.date | date_to_xmlschema }}</updated>
2323
<id>{{ site.production_url }}{{ post.id }}</id>

rss.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ title : RSS Feed
66
<?xml version="1.0" encoding="UTF-8" ?>
77
<rss version="2.0">
88
<channel>
9-
<title>{{ site.title }}</title>
10-
<description>{{ site.title }} - {{ site.author.name }}</description>
9+
<title>{{ site.title | xml_escape }}</title>
10+
<description>{{ site.title | xml_escape }} - {{ site.author.name | xml_escape }}</description>
1111
<link>{{ site.production_url }}{{ site.rss_path }}</link>
1212
<link>{{ site.production_url }}</link>
1313
<lastBuildDate>{{ site.time | date_to_xmlschema }}</lastBuildDate>
@@ -16,7 +16,7 @@ title : RSS Feed
1616

1717
{% for post in site.posts %}
1818
<item>
19-
<title>{{ post.title }}</title>
19+
<title>{{ post.title | xml_escape }}</title>
2020
<description>{{ post.content | xml_escape }}</description>
2121
<link>{{ site.production_url }}{{ post.url }}</link>
2222
<guid>{{ site.production_url }}{{ post.id }}</guid>

0 commit comments

Comments
 (0)