Changeset 136
- Timestamp:
- 04/09/2007 11:44:51 (20 months ago)
- Files:
-
- 1 modified
-
trunk/lib/hpricot/parse.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/hpricot/parse.rb
r130 r136 30 30 end 31 31 32 trans= opts[:xml] ? :to_s : :downcase32 conv = opts[:xml] ? :to_s : :downcase 33 33 34 34 fragment = … … 51 51 Hpricot.scan(input) do |token| 52 52 if stack.last[5] == :CDATA and ![:procins, :comment, :cdata].include?(token[0]) and 53 !(token[0] == :etag and token[1].send( trans) == stack.last[0])53 !(token[0] == :etag and token[1].send(conv) == stack.last[0]) 54 54 token[0] = :text 55 55 token[1] = token[3] if token[3] … … 62 62 end 63 63 64 stagname = token[0] = token[1].send( trans)64 stagname = token[0] = token[1].send(conv) 65 65 if ElementContent[stagname] == :EMPTY and !opts[:xml] 66 66 token[0] = :emptytag … … 115 115 end 116 116 when :etag 117 etagname = token[0] = token[1].send( trans)117 etagname = token[0] = token[1].send(conv) 118 118 if opts[:xhtml_strict] and not ElementContent.has_key? etagname 119 119 etagname = token[0] = "div"
