Skip to content

Commit aea5787

Browse files
committed
clean a tags
1 parent cd42526 commit aea5787

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/html/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const sanitize = html => sanitizeHtml(html, {
1111
meta: (tagName, attribs) => {
1212
if (attribs.name) attribs.name = attribs.name.toLowerCase()
1313
return {tagName, attribs}
14+
},
15+
a: (tagName, attribs) => {
16+
if (attribs.href) attribs.href = attribs.href.toLowerCase()
17+
return {tagName, attribs}
1418
}
1519
}
1620
})

0 commit comments

Comments
 (0)