fix: escape search snippet closes #7506

This commit is contained in:
Barış Soner Uşaklı
2019-03-29 20:05:55 -04:00
parent cf180e093c
commit e906bea470

View File

@@ -596,7 +596,7 @@ app.cacheBuster = null;
return; return;
} }
data.posts.forEach(function (p) { data.posts.forEach(function (p) {
p.snippet = $(p.content).text().slice(0, 80) + '...'; p.snippet = utils.escapeHTML($(p.content).text().slice(0, 80) + '...');
}); });
app.parseAndTranslate(template, data, function (html) { app.parseAndTranslate(template, data, function (html) {
html.find('.timeago').timeago(); html.find('.timeago').timeago();