chiark / gitweb /
pelican-theme: Strip tags from <title> element
authorColin Watson <cjwatson@debian.org>
Sun, 23 Aug 2026 18:27:22 +0000 (19:27 +0100)
committerColin Watson <cjwatson@debian.org>
Sun, 23 Aug 2026 18:56:53 +0000 (19:56 +0100)
A reader of my blog reported a rendering bug
(https://mastodon.social/@sil/117146095868899305), which looks similar
to https://github.com/getpelican/pelican/issues/1930.  The Pelican
maintainers said that this was a theme issue, so I think the `m.css`
theme should be tweaked to handle this properly.

m.css/pelican-theme/templates/article.html

index 1ba5d9c3e82f951484ba4c55f27f30934abb9eea..5c6d03ce755faac5eead44221b129678aae0eb41 100644 (file)
@@ -6,7 +6,7 @@
   {%- endblock %}
 {%- endmacro -%}
 
-{% block title %}{{ article.title }} | {{ M_BLOG_NAME|e }}{% endblock %}
+{% block title %}{{ article.title|striptags|e }} | {{ M_BLOG_NAME|e }}{% endblock %}
 
 {% block head_links %}
   {{- super() -}}