Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove duplicated BLOG_TITLE on front page
* Don’t strip, rather escape HTML in TITLES

Fixes #1952.
  • Loading branch information
da2x committed Aug 19, 2015
1 parent ef4d2a2 commit 4dbfeae
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -12,6 +12,8 @@ Features
Bugfixes
--------

* Don’t duplicate BLOG_TITLE in the front page title (Issue #1952)
* Escape instad of strip HTML in titles (Issue #1952)
* Make LINK_CHECK_WHITELIST apply to remote link checks
* Make STORY_INDEX work together with PRETTY_URLS (Issue #1949)
* Refactor new_post to match lazy plugin loading (Issue #1943)
Expand Down
6 changes: 5 additions & 1 deletion nikola/data/themes/base-jinja/templates/base_helper.tmpl
Expand Up @@ -26,7 +26,11 @@ lang="{{ lang }}">
<meta name="description" content="{{ description }}">
{% endif %}
<meta name="viewport" content="width=device-width">
<title>{{ title|e }} | {{ blog_title|e }}</title>
{% if title == blog_title %}
<title>{{ blog_title|e }}</title>
{% else %}
<title>{{ title|e }} | {{ blog_title|e }}</title>
{% endif %}

{{ html_stylesheets() }}
{{ html_feedlinks() }}
Expand Down
6 changes: 5 additions & 1 deletion nikola/data/themes/base/templates/base_helper.tmpl
Expand Up @@ -26,7 +26,11 @@ lang="${lang}">
<meta name="description" content="${description}">
%endif
<meta name="viewport" content="width=device-width">
<title>${title|striphtml} | ${blog_title|striphtml}</title>
%if title == blog_title:
<title>${blog_title|h}</title>
%else:
<title>${title|h} | ${blog_title|h}</title>
%endif

${html_stylesheets()}
${html_feedlinks()}
Expand Down
Expand Up @@ -31,7 +31,11 @@ lang="{{ lang }}">
<meta name="description" content="{{ description }}">
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title|e }} | {{ blog_title|e }}</title>
{% if title == blog_title %}
<title>{{ blog_title|e }}</title>
{% else %}
<title>{{ title|e }} | {{ blog_title|e }}</title>
{% endif %}

{{ html_stylesheets() }}
{{ html_feedlinks() }}
Expand Down
6 changes: 5 additions & 1 deletion nikola/data/themes/bootstrap3/templates/base_helper.tmpl
Expand Up @@ -31,7 +31,11 @@ lang="${lang}">
<meta name="description" content="${description}">
%endif
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${title|striphtml} | ${blog_title|striphtml}</title>
%if title == blog_title:
<title>${blog_title|h}</title>
%else:
<title>${title|h} | ${blog_title|h}</title>
%endif

${html_stylesheets()}
${html_feedlinks()}
Expand Down

0 comments on commit 4dbfeae

Please sign in to comment.