diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-11-13 00:08:03 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-11-13 00:08:03 +0100 |
| commit | ee009f63dd2f4856f8daf29d66301f67ab8f2021 (patch) | |
| tree | 99fa296d6091090692277d77562482c576bee7de /src | |
| parent | 43eb9c022d49047e898657bf41ee5a9d9b27fe27 (diff) | |
Don't break status parsing when link class is missing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/services/status_parser/status_parser.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/status_parser/status_parser.js b/src/services/status_parser/status_parser.js index f1d113dd..900cd56e 100644 --- a/src/services/status_parser/status_parser.js +++ b/src/services/status_parser/status_parser.js @@ -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/) }) } |
