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