Method: Temple::Utils#escape_html_safe
- Defined in:
- lib/temple/utils.rb
#escape_html_safe(html) ⇒ String
Returns an escaped copy of ‘html`. Strings which are declared as html_safe are not escaped.
17 18 19 20 |
# File 'lib/temple/utils.rb', line 17 def escape_html_safe(html) s = html.to_s s.html_safe? || html.html_safe? ? s : escape_html(s) end |