From ee009f63dd2f4856f8daf29d66301f67ab8f2021 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 13 Nov 2016 00:08:03 +0100 Subject: Don't break status parsing when link class is missing. --- src/services/status_parser/status_parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/services/status_parser/status_parser.js') 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/) }) } -- cgit v1.2.3-70-g09d2