Merge pull request #25 from sashw/sanitize_title

Strip HTML tags from title
This commit is contained in:
Alexandre Vicenzi 2016-02-02 08:56:27 -02:00
commit 055ddc8ced
3 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@
{% include "partial/og_article.html" %} {% include "partial/og_article.html" %}
{% endblock %} {% endblock %}
{% block title %} – {{ article.title }}{% endblock %} {% block title %} – {{ article.title|striptags }}{% endblock %}
{% block content %} {% block content %}
<article> <article>

View file

@ -7,8 +7,8 @@
{ {
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "BlogPosting", "@type": "BlogPosting",
"name": "{{ article.title }}", "name": "{{ article.title|striptags }}",
"headline": "{{ article.title }}", "headline": "{{ article.title|striptags }}",
"datePublished": "{{ article.date }}", "datePublished": "{{ article.date }}",
"dateModified": "{{ article.modified }}", "dateModified": "{{ article.modified }}",
"author": { "author": {

View file

@ -4,7 +4,7 @@
{% set default_locale = 'en_US' %} {% set default_locale = 'en_US' %}
{% endif %} {% endif %}
<meta property="og:site_name" content="{{ SITENAME }}"/> <meta property="og:site_name" content="{{ SITENAME }}"/>
<meta property="og:title" content="{{ article.title }}"/> <meta property="og:title" content="{{ article.title|striptags }}"/>
<meta property="og:description" content="{{ article.summary|striptags }}"/> <meta property="og:description" content="{{ article.summary|striptags }}"/>
<meta property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/> <meta property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/>
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/> <meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>