Escape titles in RSS feeds

This commit is contained in:
Baptiste Gelez 2018-11-06 10:49:46 +01:00
parent f0b911a328
commit 94904fa3d5

View File

@ -80,7 +80,7 @@ impl Page {
pub fn post_to_atom(post: Post, conn: &Connection) -> Entry { pub fn post_to_atom(post: Post, conn: &Connection) -> Entry {
EntryBuilder::default() EntryBuilder::default()
.title(post.title.clone()) .title(format!("<![CDATA[{}]]>", post.title))
.content(ContentBuilder::default() .content(ContentBuilder::default()
.value(format!("<![CDATA[{}]]>", *post.content.get())) .value(format!("<![CDATA[{}]]>", *post.content.get()))
.src(post.ap_url.clone()) .src(post.ap_url.clone())