Changeset 3153
- Timestamp:
- 11/21/05 20:43:35 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r3151 r3153 1 1 *SVN* 2 3 * Update html-scanner to handle CDATA sections better. Closes #2970. [Jamis Buck] 2 4 3 5 * Don't put flash in session if sessions are disabled. [Jeremy Kemper] trunk/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
r2952 r3153 151 151 end 152 152 153 if scanner.skip(/!\[CDATA\[/) 154 scanner.scan_until(/\]\]>/) 155 return CDATA.new(parent, line, pos, scanner.pre_match) 156 end 157 153 158 closing = ( scanner.scan(/\//) ? :close : nil ) 154 159 return Text.new(parent, line, pos, content) unless name = scanner.scan(/[\w:]+/) … … 257 262 end 258 263 end 264 265 # A CDATA node is simply a text node with a specialized way of displaying 266 # itself. 267 class CDATA < Text 268 def to_s 269 "<![CDATA[#{super}]>" 270 end 271 end 259 272 260 273 # A Tag is any node that represents markup. It may be an opening tag, a trunk/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb
r1416 r3153 53 53 tag << @scanner.matched 54 54 tag << (@scanner.scan_until(/--\s*>/) || @scanner.scan_until(/\Z/)) 55 elsif @scanner.scan(/!\[CDATA\[/) 56 tag << @scanner.matched 57 tag << @scanner.scan_until(/\]\]>/) 55 58 elsif @scanner.scan(/!/) # doctype 56 59 tag << @scanner.matched