fix(rss): double quotes in the post title will break the XML structure (#965)

This commit is contained in:
Song-Zi Vong 2023-04-10 18:35:11 +08:00 committed by GitHub
parent fe7047959e
commit 1719d81d00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ permalink: /feed.xml
{% assign post_absolute_url = post.url | absolute_url %} {% assign post_absolute_url = post.url | absolute_url %}
<entry> <entry>
<title>{{ post.title }}</title> <title>{{ post.title }}</title>
<link href="{{ post_absolute_url }}" rel="alternate" type="text/html" title="{{ post.title }}" /> <link href="{{ post_absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
<published>{{ post.date | date_to_xmlschema }}</published> <published>{{ post.date | date_to_xmlschema }}</published>
{% if post.last_modified_at %} {% if post.last_modified_at %}
<updated>{{ post.last_modified_at | date_to_xmlschema }}</updated> <updated>{{ post.last_modified_at | date_to_xmlschema }}</updated>