From e906bea4700b0f85ddb7c68a1cc9e0bf26551fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 29 Mar 2019 20:05:55 -0400 Subject: [PATCH] fix: escape search snippet closes #7506 --- public/src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/app.js b/public/src/app.js index f2b6c25ba0..1a8e1a65e5 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -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();