Skip to content

Commit

Permalink
Escape meta description
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspar Naaber committed Aug 25, 2015
1 parent f437b12 commit 137dee2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/open-graph.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@
{% endif %}

{% comment %}Open Graph description{% endcomment %}
{% if article %}{% assign description = article.description %}{% else %}{% assign description = page.description %}{% endif %}
{% if article %}
{% assign description = article.description %}
{% else %}
{% assign description = page.description %}
{% endif %}

{% if description != nil and description != '' %}
<meta property="og:description" content="{{ description }}">
<meta name="description" content="{{ description }}">
<meta property="og:description" content="{{ description | escape }}">
<meta name="description" content="{{ description | escape }}">
{% endif %}

0 comments on commit 137dee2

Please sign in to comment.