diff --git a/src/feed.njk b/src/feed.njk index d5ea538f..35ea6eb1 100644 --- a/src/feed.njk +++ b/src/feed.njk @@ -6,24 +6,24 @@ --- - {{ site.title }} - {{ site.description }} + {{ site.title | escape }} + {{ site.description | escape }} {{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }} {{ site.url }}/ - {{ site.author }} - {{ site.email }} + {{ site.author | escape }} + {{ site.email | escape }} {% for post in collections.posts | reverse %} {% if loop.index0 < 20 %} - {{ post.data.title }} + {{ post.data.title | escape }} {{ post.date | dateToRfc3339 }} {{ site.url }}{{ post.url }} - {{ post.templateContent | htmlToAbsoluteUrls(site.url + post.url) }} + {{ post.templateContent | htmlToAbsoluteUrls(site.url + post.url) | escape }} {% endif %} {% endfor %} diff --git a/src/ramblings-feed.njk b/src/ramblings-feed.njk index 29419fd8..59d85135 100644 --- a/src/ramblings-feed.njk +++ b/src/ramblings-feed.njk @@ -6,25 +6,25 @@ --- - {{ site.title }} — 碎碎念 + {{ site.title | escape }} — 碎碎念 零散的笔记、小小的想法,还有没写完的念头。 {{ collections.ramblings | newestUpdatedDate | dateToRfc3339 }} {{ site.url }}/ramblings/ - {{ site.author }} - {{ site.email }} + {{ site.author | escape }} + {{ site.email | escape }} {% for rambling in collections.ramblings | reverse %} {% if loop.index0 < 20 %} - {{ rambling.data.title }} + {{ rambling.data.title | escape }} {{ rambling.date | dateToRfc3339 }} {{ (rambling.data.updated or rambling.date) | dateToRfc3339 }} {{ site.url }}{{ rambling.url }} - {{ rambling.templateContent | htmlToAbsoluteUrls(site.url + rambling.url) }} + {{ rambling.templateContent | htmlToAbsoluteUrls(site.url + rambling.url) | escape }} {% endif %} {% endfor %}