From 79f5d245717f49b94ecc51854ecd31059bbe545d Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 20 Jan 2020 16:09:23 -0500 Subject: [PATCH] FIX: Do not error in excerpts when aside tag has no class attribute --- lib/excerpt_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/excerpt_parser.rb b/lib/excerpt_parser.rb index 9f11c1f45f8..24fc89792f6 100644 --- a/lib/excerpt_parser.rb +++ b/lib/excerpt_parser.rb @@ -101,7 +101,7 @@ class ExcerptParser < Nokogiri::XML::SAX::Document @in_quote = true end - if attributes['class'].include?('quote') + if attributes['class']&.include?('quote') if @keep_quotes || (@keep_onebox_body && attributes['data-topic'].present?) @in_quote = false end