Fix issue with falsey hrefs being sent in events (#8113)
This commit is contained in:
parent
81df4c0aeb
commit
eb668538aa
2 changed files with 11 additions and 7 deletions
|
@ -182,7 +182,11 @@ const transformTags: IExtendedSanitizeOptions["transformTags"] = { // custom to
|
|||
) {
|
||||
delete attribs.target;
|
||||
}
|
||||
} else {
|
||||
// Delete the href attrib if it is falsey
|
||||
delete attribs.href;
|
||||
}
|
||||
|
||||
attribs.rel = 'noreferrer noopener'; // https://mathiasbynens.github.io/rel-noopener/
|
||||
return { tagName, attribs };
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue