Permalink
Browse files

XML-escape the title element

The content for the <title> element should be escaped in order to prevent an invalid XML document when in cases where the contains an ampersand (&) or less-than (<) characters.
  • Loading branch information...
1 parent 7958eaa commit 1e802fb8698bde7b0347591bcb04b5194014d9b5 @barberboy barberboy committed Mar 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 atom.xml
View
@@ -16,7 +16,7 @@ layout: nil
{% for post in site.posts %}
<entry>
- <title>{{ post.title }}</title>
+ <title>{{ post.title | xml_escape }}</title>
<link href="http://{{ site.domain }}{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>http://{{ site.domain }}{{ post.id }}</id>

0 comments on commit 1e802fb

Please sign in to comment.