Skip to content

Commit a47dac2

Browse files
alwxkxkRokt33r
authored andcommitted
fix #3159
1 parent 08070f3 commit a47dac2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

browser/lib/markdown-it-sanitize-html.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ function sanitizeInline (html, options) {
9696

9797
function naughtyHRef (href, options) {
9898
// href = href.replace(/[\x00-\x20]+/g, '')
99+
if (!href) {
100+
// No href
101+
return false
102+
}
99103
href = href.replace(/<\!\-\-.*?\-\-\>/g, '')
100104

101105
const matches = href.match(/^([a-zA-Z]+)\:/)

0 commit comments

Comments
 (0)