mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo Use Nokogumbo HTML parser.
This commit is contained in:
committed by
GitHub
parent
b8b1cbbfb9
commit
9bff0882c3
@@ -8,7 +8,7 @@ class BackfillPostUploadReverseIndex < ActiveRecord::Migration[4.2]
|
||||
|
||||
# fill the reverse index up
|
||||
Post.select([:id, :cooked]).find_each do |post|
|
||||
doc = Nokogiri::HTML::fragment(post.cooked)
|
||||
doc = Nokogiri::HTML5::fragment(post.cooked)
|
||||
# images
|
||||
doc.search("img").each { |img| add_to_reverse_index(img['src'], post.id) }
|
||||
# thumbnails and/or attachments
|
||||
|
||||
Reference in New Issue
Block a user