Method: Erubis::SchemeGenerator#escape_text
- Defined in:
- lib/erubis/engine/escheme.rb
#escape_text(text) ⇒ Object
37 38 39 40 41 |
# File 'lib/erubis/engine/escheme.rb', line 37 def escape_text(text) @table_ ||= { '"'=>'\\"', '\\'=>'\\\\' } text.gsub!(/["\\]/) { |m| @table_[m] } return text end |