Ticket #1937: html_document.patch
| File html_document.patch, 1.1 kB (added by peter_marklund, 3 years ago) |
|---|
-
test/controller/assert_select_test.rb
old new 310 310 assert found 311 311 end 312 312 313 def test_assert_select_xml 314 render_html %Q{<?xml version="1.0" encoding="utf-8"?><form><link>foobar</link></form>} 315 assert_select "form link", "foobar" 316 end 317 313 318 # Test that we fail if there is nothing to pick. 314 319 def test_assert_select_rjs_fails_if_nothing_to_pick 315 320 render_rjs { } -
lib/action_controller/vendor/html-scanner/html/document.rb
old new 11 11 attr_reader :root 12 12 13 13 # Create a new Document from the given text. 14 def initialize(text, strict=false, xml= false)14 def initialize(text, strict=false, xml=(text =~ /<\?xml /)) 15 15 tokenizer = Tokenizer.new(text) 16 16 @root = Node.new(nil) 17 17 node_stack = [ @root ]