Module: ERB::Util
- Defined in:
- lib/rails2_ruby2/active_support/erb_util_silence.rb
Class Method Summary collapse
Class Method Details
.h ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/rails2_ruby2/active_support/erb_util_silence.rb', line 16 def html_escape(s) s = s.to_s if s.html_safe? s else s.gsub(/[&"'><]/, HTML_ESCAPE).html_safe end end |
.html_escape(s) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rails2_ruby2/active_support/erb_util_silence.rb', line 7 def html_escape(s) s = s.to_s if s.html_safe? s else s.gsub(/[&"'><]/, HTML_ESCAPE).html_safe end end |