Date: 2007-05-17 02:40
Sender: Daniel Hoey
I think that I have the same issue. The following unit test will
fail:
require 'rubygems'
require 'rubyful_soup'
require 'test/unit'
class RubyfulSoupTest < Test::Unit::TestCase
def test_greater_than
html = "<span>a > b</span>"
@soup = BeautifulSoup.new(html)
assert_equal(html, @soup.to_s)
end
end
This code will fix the issue (and I believe will fix Peter's
issue also):
class HTML::SGMLParser
Entitydefs = {}
end
class BeautifulStoneSoup
def unknown_entityref(ref)
handle_data("&#{ref};")
end
end |