SECURITY: Prefer Loofah for processing cooked HTML

This commit is contained in:
Bianca Nenciu
2021-02-24 17:14:43 +02:00
committed by Bianca Nenciu
parent daf34ae7e2
commit 0c8d658ba8
2 changed files with 9 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class CookedPostProcessor
@cooking_options = @cooking_options.symbolize_keys
cooked = post.cook(post.raw, @cooking_options)
@doc = Nokogiri::HTML5::fragment(cooked)
@doc = Loofah.fragment(cooked)
@has_oneboxes = post.post_analyzer.found_oneboxes?
@size_cache = {}