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