瀏覽代碼

Manually escape SITENAME

Talha Mansoor 10 年之前
父節點
當前提交
7c779ba530

+ 1 - 1
templates/404.html

@@ -5,7 +5,7 @@ Page not found · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}
-Page does not exist at {{ SITENAME|striptags }} blog. 
+Page does not exist at {{ SITENAME|striptags|e }} blog.
 {% endblock head_description %}
 {% block content %}
 <div class="row-fluid">

+ 4 - 4
templates/_includes/feeds.html

@@ -1,13 +1,13 @@
 {% if FEED_ALL_ATOM %}
-        <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - Full Atom Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - Full Atom Feed" />
 {% endif %}
 {% if FEED_ALL_RSS %}
-        <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} - Full RSS Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - Full RSS Feed" />
 {% endif %}
 {% if FEED_ATOM %}
-        <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - Atom Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - Atom Feed" />
 {% endif %}
 {% if FEED_RSS %}
-        <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} - RSS Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - RSS Feed" />
 {% endif %}
 

+ 2 - 2
templates/_includes/feeds_categories.html

@@ -1,13 +1,13 @@
 {% if CATEGORY_FEED_ATOM %}
     {% for category in categories %}
     {% set cat_name = category[0].slug %}
-        <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{category[0]}} Category Atom Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category Atom Feed" />
     {% endfor %}
 {% endif %}
 {% if CATEGORY_FEED_RSS %}
     {% for category in categories %}
     {% set cat_name = category[0].slug %}
-        <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{category[0]}} Category RSS Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category RSS Feed" />
     {% endfor %}
 {% endif %}
 

+ 2 - 2
templates/_includes/feeds_tags.html

@@ -1,12 +1,12 @@
 {% if TAG_FEED_ATOM %}
     {% for tag in tags %}
     {% set tag_name = tag[0].slug %}
-        <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{tag[0]}} Tag Atom Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag Atom Feed" />
     {% endfor %}
 {% endif %}
 {% if TAG_FEED_RSS %}
     {% for tag in tags %}
     {% set tag_name = tag[0].slug %}
-        <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{tag[0]}} Tag RSS Feed" />
+        <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag RSS Feed" />
     {% endfor %}
 {% endif %}

+ 1 - 1
templates/archives.html

@@ -5,7 +5,7 @@ All Posts · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}
-Full archives of {{ SITENAME|striptags }} blog.
+Full archives of {{ SITENAME|striptags|e }} blog.
 {% endblock head_description %}
 
 {% block content %}

+ 1 - 1
templates/base.html

@@ -25,7 +25,7 @@
         <link rel="author" href={{GOOGLE_PLUS_PROFILE_URL}} />
         {% endif %}
         {% endblock meta_tags_in_head %}
-        <title>{% block title %}{{ SITENAME|striptags }}{% endblock title %}</title>
+        <title>{% block title %}{{ SITENAME|striptags|e }}{% endblock title %}</title>
         {% block head_links %}
         <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
         <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.css" rel="stylesheet">

+ 1 - 1
templates/categories.html

@@ -5,7 +5,7 @@ All Categories · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}
-All categories of the {{ SITENAME|striptags }} blog. 
+All categories of the {{ SITENAME|striptags|e }} blog. 
 {% endblock head_description %}
 
 {% block feed_links %}

+ 3 - 3
templates/index.html

@@ -11,8 +11,8 @@
 <meta property="og:title" content="{{ LANDING_PAGE_ABOUT.title }}"/>
 <meta name="twitter:title" content="{{ LANDING_PAGE_ABOUT.title }}">
 {% else %}
-<meta property="og:title" content="{{ SITENAME|striptags }}"/>
-<meta name="twitter:title" content="{{ SITENAME|striptags }}">
+<meta property="og:title" content="{{ SITENAME|striptags|e }}"/>
+<meta name="twitter:title" content="{{ SITENAME|striptags|e }}">
 {% endif %}
 <meta property="og:type" content="article" />
 <meta property="og:url" content="{{ SITEURL }}" />
@@ -21,7 +21,7 @@
 <meta property="og:description" content="{{SITE_DESCRIPTION}}" />
 <meta name="twitter:description" content="{{SITE_DESCRIPTION}}">
 {% endif %}
-<meta property="og:site_name" content="{{ SITENAME|striptags }}" />
+<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
 <meta property="og:article:author" content="{{ AUTHOR }}" />
 <meta name="twitter:card" content="summary">
 {% from '_includes/_defaults.html' import TWITTER_USERNAME with context %}

+ 1 - 1
templates/search.html

@@ -5,7 +5,7 @@ Search · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}
-Search results for {{ SITENAME|striptags }} blog.
+Search results for {{ SITENAME|striptags|e }} blog.
 {% endblock head_description %}
 
 {% block script %}

+ 1 - 1
templates/tags.html

@@ -5,7 +5,7 @@ All Tags · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}
-All tags used in the {{ SITENAME|striptags }} blog.
+All tags used in the {{ SITENAME|striptags|e }} blog.
 {% endblock head_description %}
 
 {% block feed_links %}