Module: MasterView::EscapeErbHelper
- Defined in:
- lib/masterview/filter_helpers.rb
Overview
Helper service to support a preprocessing filter to escape Erb markup into inline-erb notation within a template document. Optionally applied to all incoming templates prior to MasterView processing if the MasterView :escape_erb
parser option is enabled.
Class Method Summary collapse
Class Method Details
.escape_erb(html) ⇒ Object
46 47 48 49 50 |
# File 'lib/masterview/filter_helpers.rb', line 46 def self.escape_erb(html) html = html.gsub(/<%/, InlineErbStart) html.gsub!(/%>/, InlineErbEnd) html end |