From 3090b344d85fb8d99253af10165d9e6df9c4a304 Mon Sep 17 00:00:00 2001 From: Sascha Wagner Date: Sun, 31 Jan 2016 16:44:14 +0100 Subject: [PATCH 1/2] Strip HTML tags from title (cherry picked from commit 79314426a4e3a4142c3ed2907839a03fed6f972c) Signed-off-by: Sascha Wagner --- templates/article.html | 2 +- templates/partial/og_article.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/article.html b/templates/article.html index ae24ec3a..ddeadf7b 100644 --- a/templates/article.html +++ b/templates/article.html @@ -7,7 +7,7 @@ {% include "partial/og_article.html" %} {% endblock %} -{% block title %} – {{ article.title }}{% endblock %} +{% block title %} – {{ article.title|striptags }}{% endblock %} {% block content %}
diff --git a/templates/partial/og_article.html b/templates/partial/og_article.html index 50d4df35..4e46494f 100644 --- a/templates/partial/og_article.html +++ b/templates/partial/og_article.html @@ -4,7 +4,7 @@ {% set default_locale = 'en_US' %} {% endif %} - + From ad1ea4186dd34ac3551899adc80f4cc7a5d4d74e Mon Sep 17 00:00:00 2001 From: Sascha Wagner Date: Tue, 2 Feb 2016 08:56:12 +0100 Subject: [PATCH 2/2] Strip tags from title in JSON-LD (cherry picked from commit 0bb74527677de3163f9fa81d7320680b0f1adb91) Signed-off-by: Sascha Wagner --- templates/partial/jsonld_article.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/partial/jsonld_article.html b/templates/partial/jsonld_article.html index 8d39aaba..f0cd70e6 100644 --- a/templates/partial/jsonld_article.html +++ b/templates/partial/jsonld_article.html @@ -7,8 +7,8 @@ { "@context": "http://schema.org", "@type": "BlogPosting", - "name": "{{ article.title }}", - "headline": "{{ article.title }}", + "name": "{{ article.title|striptags }}", + "headline": "{{ article.title|striptags }}", "datePublished": "{{ article.date }}", "dateModified": "{{ article.modified }}", "author": {