| Class | BeautifulStoneSoup |
| In: |
lib/rdig/content_extractors/rubyful_soup.rb
|
| Parent: | Object |
override some methods concered with entity resolving to convert them to strings
| unknown_entityref | -> | orig_unknown_entityref |
| resolve unknown html entities using the htmlentities lib | ||
resolve numeric entities to utf8
# File lib/rdig/content_extractors/rubyful_soup.rb, line 22
22: def handle_charref(ref)
23: handle_data( ref.gsub(/([0-9]{1,7})/) {
24: [$1.to_i].pack('U')
25: }.gsub(/x([0-9a-f]{1,6})/i) {
26: [$1.to_i(16)].pack('U')
27: } )
28: end