From 9ca9f95aee3f44acd3a5ee1cb3e2b20df39ee92b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 26 Mar 2005 14:07:08 +0000 Subject: Fixed Form.Serialize for the JavascriptHelper to also seriliaze password fields #934 [dweitzman@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_view/helpers/javascripts/prototype.js | 1 + railties/html/javascripts/prototype.js | 1 + 3 files changed, 4 insertions(+) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index ba3c4bd485..6c0f1b206a 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed Form.Serialize for the JavascriptHelper to also seriliaze password fields #934 [dweitzman@gmail.com] + * Added JavascriptHelper#escape_javascript as a public method (was private) and made it escape both single and double quotes and new lines #940 [mortonda@dgrmm.net] * Added trailing_slash option to url_for, so you can generate urls ending in a slash. Note that is currently not recommended unless you need it for special reasons since it breaks caching #937 [stian@grytoyr.net] diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js index 5d8d69dedb..10e5f69cf6 100644 --- a/actionpack/lib/action_view/helpers/javascripts/prototype.js +++ b/actionpack/lib/action_view/helpers/javascripts/prototype.js @@ -280,6 +280,7 @@ Form.Element.Serializers = { input: function(element) { switch (element.type.toLowerCase()) { case 'hidden': + case 'password': case 'text': return Form.Element.Serializers.textarea(element); case 'checkbox': diff --git a/railties/html/javascripts/prototype.js b/railties/html/javascripts/prototype.js index 5f2f9edb9c..46100c31a6 100644 --- a/railties/html/javascripts/prototype.js +++ b/railties/html/javascripts/prototype.js @@ -269,6 +269,7 @@ Form.Element.Serializers = { input: function(element) { switch (element.type.toLowerCase()) { case 'hidden': + case 'password': case 'text': return Form.Element.Serializers.textarea(element); case 'checkbox': -- cgit v1.2.3