module Hpricot
def self.uxs(str)
Monkeypatch to fix an Hpricot bug that causes HTML entities to be decoded
def self.uxs(str) str.to_s. gsub(/&(\w+);/) { [Hpricot::NamedCharacters[$1] || ??].pack("U*") }. gsub(/\&\#(\d+);/) { [$1.to_i].pack("U*") } end