Class: ActionView::Base
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
- #button_to_with_xss_protection(text, *args) ⇒ Object
- #link_to_with_xss_protection(text, *args) ⇒ Object
Instance Method Details
#button_to_with_xss_protection(text, *args) ⇒ Object
96 97 98 |
# File 'lib/xss_shield/secure_helpers.rb', line 96 def (text, *args) (text.to_xss_safe, *args).xss_safe end |
#link_to_with_xss_protection(text, *args) ⇒ Object
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 |