Revert "DEV: Remove useless code (#10130)"

Revert “DEV: Remove useless code (#10130)”

Some oneboxes still generate empty P tags (video oneboxes).

This reverts commit c299d02287564e3d09fd563a4ab3ba7ed684596b.

diff --git a/lib/oneboxer.rb b/lib/oneboxer.rb
index d045e58..107e6d0 100644
--- a/lib/oneboxer.rb
+++ b/lib/oneboxer.rb
@@ -115,6 +115,13 @@ module Oneboxer
       end
     end
 
+    # strip empty <p> elements
+    doc.css("p").each do |p|
+      if p.children.empty? && doc.children.count > 1
+        p.remove
+      end
+    end
+
     Result.new(doc, changed)
   end
 

GitHub sha: fe284ffd