Skip to content

Commit 85c76f5

Browse files
committed
fix: strip html tags for gist id to avoid stored XSS on showing error [Security Issue]
Signed-off-by: Max Wu <[email protected]>
1 parent 8c20d9f commit 85c76f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/js/extra.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ const gistPlugin = new Plugin(
13411341

13421342
(match, utils) => {
13431343
const gistid = match[1].split(/[?&=]+/)[0]
1344-
const code = `<code data-gist-id="${gistid}"></code>`
1344+
const code = `<code data-gist-id="${stripTags(gistid)}"></code>`
13451345
return code
13461346
}
13471347
)

0 commit comments

Comments
 (0)