Module: Hamlit::Utils
- Defined in:
- lib/hamlit/utils.rb,
ext/hamlit/hamlit.c
Class Method Summary collapse
Class Method Details
.escape_html(html) ⇒ Object
85 86 87 |
# File 'ext/hamlit/hamlit.c', line 85 def self.escape_html(html) CGI.escapeHTML(html.to_s) end |
.escape_html_safe(html) ⇒ Object
14 15 16 |
# File 'lib/hamlit/utils.rb', line 14 def self.escape_html_safe(html) html.html_safe? ? html : escape_html(html) end |