mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-05-19 04:08:32 +00:00
fixed xss issue with mentions
This commit is contained in:
parent
6599160707
commit
980d778504
1 changed files with 8 additions and 4 deletions
|
|
@ -17,10 +17,14 @@ export default order => {
|
|||
html: function(node) {
|
||||
const member = store.getters["members/members"][node.id];
|
||||
if (!member) return node.orig;
|
||||
return SimpleMarkdown.htmlTag("span", "@" + member.username, {
|
||||
class: "mention",
|
||||
id: "mention-" + member.uniqueID
|
||||
});
|
||||
return SimpleMarkdown.htmlTag(
|
||||
"span",
|
||||
"@" + SimpleMarkdown.sanitizeText(member.username),
|
||||
{
|
||||
class: "mention",
|
||||
id: "mention-" + member.uniqueID
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue