mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: escape search snippet closes #7506
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user