This project is archived. Its data is read-only.

Unescape HTML entities

Not sure if this is a bug, but consider following example:

require 'nokogiri'
require 'oga'

xml = '<content>&lt;div&gt;OMG&lt;/div&gt;</content>'

puts '--- Nokogiri'
puts Nokogiri::XML(xml).children.first.text

puts '--- Oga'
puts Oga.parse_xml(xml).children.first.text

The output is:

--- Nokogiri
<div>OMG</div>
--- Oga
&lt;div&gt;OMG&lt;/div&gt;

It looks like Nokogiri does unescape HTML entities in a node text by default. The question is should Oga do the same?

Assignee Loading
Time tracking Loading