Skip to content

Commit

Permalink
fix: escape search snippet closes #7506
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Mar 30, 2019
1 parent cf180e0 commit e906bea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ app.cacheBuster = null;
return;
}
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) {
html.find('.timeago').timeago();
Expand Down

0 comments on commit e906bea

Please sign in to comment.