Browse code

Proper atom feed xml escaping

Aleksey Gureiev authored on 02/10/2011 at 06:05:54
Showing 1 changed files
... ...
@@ -4,21 +4,21 @@ layout: nil
4 4
 <?xml version="1.0" encoding="utf-8"?>
5 5
 <feed xmlns="http://www.w3.org/2005/Atom">
6 6
 
7
-  <title>{{ site.title }}</title>
7
+  <title>{{ site.title | xml_escape }}</title>
8 8
   <link href="{{ site.url }}/atom.xml" rel="self"/>
9 9
   <link href="{{ site.url }}/"/>
10 10
   <updated>{{ site.time | date_to_xmlschema }}</updated>
11 11
   <id>{{ site.url }}/</id>
12 12
   <author>
13
-    <name>{{ site.author }}</name>
13
+    <name>{{ site.author | xml_escape }}</name>
14 14
     {% if site.email %}
15
-      <email>{{ site.email }}</email>
15
+      <email>{{ site.email | xml_escape }}</email>
16 16
     {% endif %}
17 17
   </author>
18 18
 
19 19
   {% for post in site.posts limit: 20 %}
20 20
   <entry>
21
-    <title>{{ post.title }}</title>
21
+    <title>{{ post.title | xml_escape }}</title>
22 22
     <link href="{{ site.url }}{{ post.url }}"/>
23 23
     <updated>{{ post.date | date_to_xmlschema }}</updated>
24 24
     <id>{{ site.url }}{{ post.id }}</id>