Skip to content

Commit e8de772

Browse files
authored
fix(daattali#744): Escape special characters in title (daattali#745)
1 parent 8b41236 commit e8de772

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain
77
- Fixed issue where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio
88
- Added support for Patreon in the social network links in the footer
9+
- Fixed bug where special characters in the title led to broken share tags (#744)
910

1011
## v5.0.0 (2020-09-15)
1112

_includes/head.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
{% capture title %}
66
{%- if page.share-title -%}
7-
{{ page.share-title }}
7+
{{ page.share-title | strip_html | xml_escape }}
88
{%- elsif page.title -%}
9-
{{ page.title }}
9+
{{ page.title | strip_html | xml_escape }}
1010
{%- else -%}
11-
{{ site.title }}
11+
{{ site.title | strip_html | xml_escape }}
1212
{%- endif -%}
1313
{% endcapture %}
1414

1515
{% capture description %}
1616
{%- if page.share-description -%}
17-
{{ page.share-description }}
17+
{{ page.share-description | strip_html | xml_escape }}
1818
{%- elsif page.subtitle -%}
19-
{{ page.subtitle }}
19+
{{ page.subtitle | strip_html | xml_escape }}
2020
{%- else -%}
2121
{%- assign excerpt_length = site.excerpt_length | default: 50 -%}
2222
{{ page.content | strip_html | xml_escape | truncatewords: excerpt_length | strip }}

0 commit comments

Comments
 (0)