Don't break status parsing when link class is missing.
This commit is contained in:
parent
43eb9c022d
commit
ee009f63dd
2 changed files with 7 additions and 1 deletions
|
@ -4,7 +4,7 @@ export const removeAttachmentLinks = (html) => {
|
|||
return sanitize(html, {
|
||||
allowedTags: false,
|
||||
allowedAttributes: false,
|
||||
exclusiveFilter: ({ tag, attribs }) => tag === 'a' && attribs.class.match(/attachment/)
|
||||
exclusiveFilter: ({ tag, attribs }) => tag === 'a' && typeof attribs.class === 'string' && attribs.class.match(/attachment/)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue