Class: ActionView::Base

Inherits:
Object show all
Defined in:
lib/xss_shield/secure_helpers.rb

Overview

Mark known helpers as xss_safe only if their arguments are guaranteed to be safe. Don’t mark methods that take a block as xss_safe.

Instance Method Summary collapse

Instance Method Details

#button_to_with_xss_protection(text, *args) ⇒ Object



96
97
98
# File 'lib/xss_shield/secure_helpers.rb', line 96

def button_to_with_xss_protection(text, *args)
  button_to_without_xss_protection(text.to_xss_safe, *args).xss_safe
end


91
92
93
# File 'lib/xss_shield/secure_helpers.rb', line 91

def link_to_with_xss_protection(text, *args)
  link_to_without_xss_protection(text.to_xss_safe, *args).xss_safe
end