aboutsummaryrefslogtreecommitdiff
path: root/src/services/status_parser/status_parser.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2016-11-13 00:08:03 +0100
committerRoger Braun <roger@rogerbraun.net>2016-11-13 00:08:03 +0100
commitee009f63dd2f4856f8daf29d66301f67ab8f2021 (patch)
tree99fa296d6091090692277d77562482c576bee7de /src/services/status_parser/status_parser.js
parent43eb9c022d49047e898657bf41ee5a9d9b27fe27 (diff)
Don't break status parsing when link class is missing.
Diffstat (limited to 'src/services/status_parser/status_parser.js')
-rw-r--r--src/services/status_parser/status_parser.js2
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/)
})
}