Permalink
Browse files

Clean up ajax.serialize

  • Loading branch information...
seven1m committed Dec 22, 2008
1 parent a37869b commit 9538f8778780bfac6636ebfc87442676991b56d6
Showing with 4 additions and 4 deletions.
  1. +1 −1 pkg/ajax.js
  2. +1 −2 src/ajax.js
  3. +1 −1 test/public/js/ajax.js
  4. +1 −0 test/tests/ajax_test.rb
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -27,8 +27,7 @@ mini.form.serialize=function(f){
return f.getElementsByTagName(n)
};
var nv=function(e){
- if(e.name)return encodeURIComponent(e.name)+'='+encodeURIComponent(e.value);
- else return null
+ if(e.name)return encodeURIComponent(e.name)+'='+encodeURIComponent(e.value)
};
var i=collect(
g('input'),
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -33,6 +33,7 @@ def test_serialize
assert_no_match /radio_input=value 1/, unescaped
assert_match /select_input=value 1/, unescaped
assert_no_match /select_input=value 2/, unescaped
+ assert_no_match /test serialize/, unescaped
assert_match /textarea_input=here is some text\s*with\s*a line break or two/, unescaped
end

0 comments on commit 9538f87

Please sign in to comment.