mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix #573
This commit is contained in:
parent
3bc28b5e8a
commit
1f3015bd2c
2 changed files with 6 additions and 1 deletions
|
|
@ -44,6 +44,8 @@ Template.editor.onRendered(() => {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
import sanitizeXss from 'xss';
|
||||||
|
|
||||||
// XXX I believe we should compute a HTML rendered field on the server that
|
// XXX I believe we should compute a HTML rendered field on the server that
|
||||||
// would handle markdown, emoji and user mentions. We can simply have two
|
// would handle markdown, emoji and user mentions. We can simply have two
|
||||||
// fields, one source, and one compiled version (in HTML) and send only the
|
// fields, one source, and one compiled version (in HTML) and send only the
|
||||||
|
|
@ -86,7 +88,7 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
|
||||||
content = content.replace(fullMention, Blaze.toHTML(link));
|
content = content.replace(fullMention, Blaze.toHTML(link));
|
||||||
}
|
}
|
||||||
|
|
||||||
return HTML.Raw(content);
|
return HTML.Raw(sanitizeXss(content));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Template.viewer.events({
|
Template.viewer.events({
|
||||||
|
|
|
||||||
|
|
@ -18,5 +18,8 @@
|
||||||
"homepage": "https://wekan.io",
|
"homepage": "https://wekan.io",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^2.0.0"
|
"eslint": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"xss": "^0.2.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue