mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-09 17:52:20 +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) {
|
html: function(node) {
|
||||||
const member = store.getters["members/members"][node.id];
|
const member = store.getters["members/members"][node.id];
|
||||||
if (!member) return node.orig;
|
if (!member) return node.orig;
|
||||||
return SimpleMarkdown.htmlTag("span", "@" + member.username, {
|
return SimpleMarkdown.htmlTag(
|
||||||
class: "mention",
|
"span",
|
||||||
id: "mention-" + member.uniqueID
|
"@" + SimpleMarkdown.sanitizeText(member.username),
|
||||||
});
|
{
|
||||||
|
class: "mention",
|
||||||
|
id: "mention-" + member.uniqueID
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue