module Haml::Helpers
def escape_once(text)
-
(String)
- The sanitized string
Parameters:
-
text
(String
) -- The string to sanitize
def escape_once(text) Haml::Util.silence_warnings do text.to_s.gsub(/[\"><]|&(?!(?:[a-zA-Z]+|(#\d+));)/n) {|s| HTML_ESCAPE[s]} end end