Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix a nokogiri deprecation (#16060)

Jarek Radoszff530264f4d4
diff --git a/lib/cooked_processor_mixin.rb b/lib/cooked_processor_mixin.rb
index 54a84d80b0f..7c6c8ed1faf 100644
--- a/lib/cooked_processor_mixin.rb
+++ b/lib/cooked_processor_mixin.rb
@@ -330,8 +330,9 @@ module CookedProcessorMixin
end
def create_node(tag_name, klass)
- node = Nokogiri::XML::Node.new(tag_name, @doc)
+ node = @doc.document.create_element(tag_name)
node["class"] = klass if klass.present?
+ @doc.add_child(node)
node
end