5
Tengo un título que sale &
y debería ser &
.Cómo descomprimir HTML en Nokogiri Ruby, entonces & permanece & y no &
Mi documento original es:
<head><title>Foo & Bar</title></head>
pero en sale como la siguiente:
>> doc = Nokogiri::HTML.parse(file, nil, "UTF-8")
>> doc.at('head/title')
=> #<Nokogiri::XML::Element:0x..fdb851bea name="title" children=#<Nokogiri::XML::Text:0x..fdb850808 "Foo & Bar">>
>> doc.at('head/title').inner_html
=> "Foo & Bar"
no quiero utilizar Iconv o CGI como:
>> require 'cgi'
>> CGI.unescapeHTML(doc.at('head/title').inner_html)
=> "Foo & Bar"
eso es feo e inconveniente.