Method: Temple::Utils#escape_html

Defined in:
lib/temple/utils.rb,
lib/temple/utils.rb

#escape_html(html) ⇒ String

Returns an escaped copy of ‘html`.

Parameters:

  • html (String)

    The string to escape

Returns:

  • (String)

    The escaped string



27
28
29
# File 'lib/temple/utils.rb', line 27

def escape_html(html)
  CGI.escapeHTML(html.to_s)
end