Changeset 139
- Timestamp:
- 04/17/2007 17:34:54 (20 months ago)
- Location:
- trunk/lib/hpricot
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/hpricot/builder.rb
r137 r139 191 191 if block or args.any? 192 192 args.push(@attrs) 193 @builder.tag! @sym, *args, &block193 return @builder.tag! @sym, *args, &block 194 194 end 195 195 -
trunk/lib/hpricot/tag.rb
r130 r139 138 138 alterable :content 139 139 def pathname; "text()" end 140 alias_method :inner_text, :content141 140 def to_s 142 141 Hpricot.uxs(@content) 143 142 end 143 alias_method :inner_text, :to_s 144 144 alias_method :to_plain_text, :to_s 145 145 def output(out, opts = {}) -
trunk/lib/hpricot/xchar.rb
r125 r139 87 87 # XML unescape 88 88 def uxs(str) 89 str.gsub(/\&\w+;/) { |x| XChar::PREDEFINED_U[x].chr }.89 str.gsub(/\&\w+;/) { |x| (XChar::PREDEFINED_U[x] || ??).chr }. 90 90 gsub(/\&\#(\d+);/) { [$1.to_i].pack("U*") } 91 91 end
