Skip to content

Commit 6f0ff49

Browse files
committed
XML escape title & description of plugins in meta
1 parent 6cc3827 commit 6f0ff49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_layouts/default.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<link rel="alternate" type="application/rss+xml" title="OctoPrint Plugin Repository: New Plugins" href="{{ '/feed.xml' | prepend: site.baseurl }}">
3434

3535
<!-- Le social media meta data -->
36-
{% capture thetitle %}{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}{% endcapture %}
37-
{% capture thedescription %}{% if page.excerpt %}{{ page.excerpt | strip_html }}{% else %}{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}{% endif %}{% endcapture %}
36+
{% capture thetitle %}{% if page.title %}{{ page.title | xml_escape }}{% else %}{{ site.title }}{% endif %}{% endcapture %}
37+
{% capture thedescription %}{% if page.excerpt %}{{ page.excerpt | strip_html | xml_escape }}{% else %}{% if page.description %}{{ page.description | xml_escape }}{% else %}{{ site.description }}{% endif %}{% endif %}{% endcapture %}
3838
{% if page.featuredimage %}
3939
{% capture theimage %}{{ site.external }}{{ BASE_PATH }}{{ page.featuredimage }}{% endcapture %}
4040
{% capture thecard %}{{ site.external }}{{ BASE_PATH }}{{ page.card }}{% endcapture %}

0 commit comments

Comments
 (0)