diff options
author | Brian Lopez <seniorlopez@gmail.com> | 2010-08-09 12:43:49 -0700 |
---|---|---|
committer | Brian Lopez <seniorlopez@gmail.com> | 2010-08-09 12:43:49 -0700 |
commit | ee9c950f2fe0c7953f0a9ad6a53439da7a4e89bc (patch) | |
tree | 1b3f6a3e49be0ebacb251de0c0fc12bf64e2e596 /actionpack/lib/action_view | |
parent | d8b90114ddd2a432280d114b9fe4ef1fdb38d132 (diff) | |
parent | 7171161124a2852ee7b40c5c632ba8e092c97409 (diff) | |
download | rails-ee9c950f2fe0c7953f0a9ad6a53439da7a4e89bc.tar.gz rails-ee9c950f2fe0c7953f0a9ad6a53439da7a4e89bc.tar.bz2 rails-ee9c950f2fe0c7953f0a9ad6a53439da7a4e89bc.zip |
bringing over latest from master
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/sanitize_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 9dac2d4538..1ea870426a 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -538,7 +538,7 @@ module ActionView def extra_tags_for_form(html_options) snowman_tag = tag(:input, :type => "hidden", - :name => "_snowman", :value => "☃".html_safe) + :name => "_e", :value => "☃".html_safe) method = html_options.delete("method").to_s diff --git a/actionpack/lib/action_view/helpers/sanitize_helper.rb b/actionpack/lib/action_view/helpers/sanitize_helper.rb index 63f6154ec4..d82005fa24 100644 --- a/actionpack/lib/action_view/helpers/sanitize_helper.rb +++ b/actionpack/lib/action_view/helpers/sanitize_helper.rb @@ -1,3 +1,4 @@ +require 'active_support/core_ext/object/try' require 'action_controller/vendor/html-scanner' require 'action_view/helpers/tag_helper' @@ -7,6 +8,7 @@ module ActionView # The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. # These helper methods extend Action View making them callable within your template files. module SanitizeHelper + extend ActiveSupport::Concern # This +sanitize+ helper will html encode all tags and strip all attributes that # aren't specifically allowed. # diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 52a016c9c1..c1de5c8cb3 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -10,6 +10,9 @@ module ActionView # your views. These helper methods extend Action View making them callable # within your template files. module TextHelper + extend ActiveSupport::Concern + + include SanitizeHelper # The preferred method of outputting text in your views is to use the # <%= "text" %> eRuby syntax. The regular _puts_ and _print_ methods # do not operate as expected in an eRuby code block. If you absolutely must |