Module: Rabbit::Parser::Ext::Escape
- Defined in:
- lib/rabbit/parser/ext/escape.rb
Constant Summary collapse
- META_CHAR =
{"<" => "<", ">" => ">", "&" => "&"}
Class Method Summary collapse
Class Method Details
.escape_meta_character(str) ⇒ Object
10 11 12 13 14 |
# File 'lib/rabbit/parser/ext/escape.rb', line 10 def (str) str.gsub(/[<>&]/) do META_CHAR[$MATCH] end end |