mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
SECURITY: Prefer Loofah for processing cooked HTML
This commit is contained in:

committed by
Bianca Nenciu

parent
daf34ae7e2
commit
0c8d658ba8
@ -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 = {}
|
||||
|
||||
|
Reference in New Issue
Block a user