Skip to content

Commit 9b0197b

Browse files
committed
🐛 修复摘要转义 #799
1 parent c641058 commit 9b0197b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

layout/_partials/head.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (keywords instanceof Array) {
77
}
88
var description = page.description || page.excerpt || (is_post() && page.content) || config.description
99
if (description) {
10-
description = escape_html(strip_html(description).substring(0, 200).trim()).replace(/\n/g, ' ')
10+
description = strip_html(description).substring(0, 200).trim().replace(/\n/g, ' ')
1111
}
1212
var ogImage = page.og_img || page.index_img
1313
var ogConfig = Object.assign({ image: ogImage && url_for(ogImage) }, theme.open_graph)

layout/index.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ page.banner_mask_alpha = theme.index.banner_mask_alpha
3030
<% var excerpt = post.description || post.excerpt || (theme.index.auto_excerpt.enable && post.content) %>
3131
<a class="index-excerpt <%= index_img ? '' : 'index-excerpt__noimg' %>" href="<%= post_url %>" target="<%- theme.index.post_url_target %>">
3232
<div>
33-
<%- escape_html(strip_html(excerpt).substring(0, 200).trim()).replace(/\n/g, ' ') %>
33+
<%- strip_html(excerpt).substring(0, 200).trim().replace(/\n/g, ' ') %>
3434
</div>
3535
</a>
3636

0 commit comments

Comments
 (0)