Changeset 7513
- Timestamp:
- 09/18/07 11:56:04 (1 year ago)
- Files:
-
- trunk/actionpack/lib/action_view/base.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_view/base.rb
r7261 r7513 1 1 require 'erb' 2 3 class ERB 4 module Util 5 HTML_ESCAPE = { '&' => '&', '"' => '"', '>' => '>', '<' => '<' } 6 7 def html_escape(s) 8 s.to_s.gsub(/[&\"><]/) { |special| HTML_ESCAPE[special] } 9 end 10 end 11 end 2 12 3 13 module ActionView #:nodoc: