From d6953cbfd3b6e06eceba715c60e288b6d7db0d49 Mon Sep 17 00:00:00 2001 From: wycats Date: Mon, 7 Jun 2010 17:00:09 -0400 Subject: regular expressions are usually ASCII-encoded, so force_encoding the content of a Node to the encoding of the regular expression is wrong. --- actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller/vendor') diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb index 602411ed37..064ff3724d 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb @@ -23,6 +23,7 @@ module HTML #:nodoc: # Create a new Tokenizer for the given text. def initialize(text) + text.encode! if text.encoding_aware? @scanner = StringScanner.new(text) @position = 0 @line = 0 -- cgit v1.2.3