module EscapeUtils

Constants

VERSION

Public Class Methods

html_safe_string_class() click to toggle source

Default String class to return from HTML escaping

# File lib/escape_utils.rb, line 16
def self.html_safe_string_class
  @html_safe_string_class
end
html_secure() click to toggle source

turn on/off the escaping of the '/' character during HTML escaping Escaping '/' is recommended by the OWASP - www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content This is because quotes around HTML attributes are optional in most/all modern browsers at the time of writing (10/15/2010)

# File lib/escape_utils.rb, line 10
def self.html_secure
  @html_secure
end