From 708190802c3a88b2e0aa1da0f772e75e20363f58 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 17 Feb 2020 13:52:23 -0500 Subject: [PATCH] FIX: Strip video oneboxes from excerpts Follows up on 49843f327e88538a487d37b5d3c288da15b99908 and removes onebox markup for videos too in the excerpt, this was previously being counted as part of the excerpt length. --- lib/pretty_text.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb index e5c7fff2106..de9c1c8cdbb 100644 --- a/lib/pretty_text.rb +++ b/lib/pretty_text.rb @@ -376,7 +376,7 @@ module PrettyText def self.strip_oneboxed_media(doc) doc.css("audio").remove - doc.css("video").remove + doc.css(".video-onebox,video").remove end def self.convert_vimeo_iframes(doc)