mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
fix(security): harden URL and HTML sanitization
This commit is contained in:
6 files changed
+9
-6
No files matched your search
@@ -7,7 +7,7 @@ import { renderNeutralMessage } from "./render";
|
||||
const markdown = new MarkdownIt({ html: false, linkify: false, breaks: false, typographer: false });
|
||||
|
||||
function markdownToText(value: string): string {
|
||||
return markdown.renderInline(value).replace(/<[^>]*>/gu, "");
|
||||
return markdown.renderInline(value).replace(/<[^>]*>/gu, "").replace(/</g, "");
|
||||
}
|
||||
|
||||
function smallAvatar(url: string): string {
|
||||
|
||||
Reference in new issue
Block a user