vendor/osx/gems/hpricot-0.5/lib/hpricot/text.rb
# Hpricot::Text#to_s converts the text to a string.
# - character references are decoded as much as possible.
# - undecodable character reference are converted to `?' character.
:Text#to_s converts the text to a string.
character references are decoded as much as possible.
undecodable character reference are converted to `?' character.
: Text#to_s converts the text to a string . character references are decoded as much as possible . undecodable character reference are converted to ` ? ' character .
def to_s
      @normalized_rcdata.gsub(/&(?:#([0-9]+));/o) {|s|
        u = $1.to_i
        if 0 <= u && u <= 0x7f
          [u].pack("C")
        else
          '?'
        end
      }
    end
def to_s @normalized_rcdata . gsub ( / &(?:#([0-9]+)); /o ) { | s | u = $1 . to_i if 0 <= u && u <= 0x7f [ u ] . pack ( "C" ) else '?' end } end
Hpricot::Text#to_s converts the text to a string.
Hpricot :: Text#to_s converts the text to a string .