mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-19 18:42:34 +00:00
Escape page metadata in post template (#884)
This commit is contained in:
parent
13cc3171de
commit
ae14cd177c
@ -19,8 +19,8 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||||||
<meta itemprop="name" content="{{ page.title + ' | ' + title }}">
|
<meta itemprop="name" content="{{ escape_html(page.title or '') + ' | ' + title }}">
|
||||||
<meta itemprop="description" content="{{ page.description }}">
|
<meta itemprop="description" content="{{ escape_html(page.description or '') }}">
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{%- if post.header !== false %}
|
{%- if post.header !== false %}
|
||||||
@ -134,14 +134,14 @@
|
|||||||
<div class="post-nav">
|
<div class="post-nav">
|
||||||
<div class="post-nav-item">
|
<div class="post-nav-item">
|
||||||
{%- if prev %}
|
{%- if prev %}
|
||||||
<a href="{{ url_for(prev.path) }}" rel="prev" title="{{ prev.title }}">
|
<a href="{{ url_for(prev.path) }}" rel="prev" title="{{ escape_html(prev.title or '') }}">
|
||||||
<i class="fa fa-angle-left"></i> {{ prev.title }}
|
<i class="fa fa-angle-left"></i> {{ prev.title }}
|
||||||
</a>
|
</a>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="post-nav-item">
|
<div class="post-nav-item">
|
||||||
{%- if next %}
|
{%- if next %}
|
||||||
<a href="{{ url_for(next.path) }}" rel="next" title="{{ next.title }}">
|
<a href="{{ url_for(next.path) }}" rel="next" title="{{ escape_html(next.title or '') }}">
|
||||||
{{ next.title }} <i class="fa fa-angle-right"></i>
|
{{ next.title }} <i class="fa fa-angle-right"></i>
|
||||||
</a>
|
</a>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user