Module: Hache
- Defined in:
- lib/hache.rb
Constant Summary collapse
- HTML_ESCAPE =
{ "&" => "&", ">" => ">", "<" => "<", "'" => "'", '"' => """ }.freeze
- UNSAFE =
/[&"'><]/
Class Method Summary collapse
Class Method Details
.h(s) ⇒ Object
16 17 18 |
# File 'lib/hache.rb', line 16 def h(s) s.to_str.gsub(UNSAFE, HTML_ESCAPE) end |