actionpack 3.2.13.rc2 → 3.2.13

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f943a750987b09069baafc822dd3bf4e29521974
4
- data.tar.gz: 984d1155cc421460aefb79f9ff62bba3fccd7b2d
3
+ metadata.gz: 569b15ce13157be51921055abc1ff8bae4b8bcb6
4
+ data.tar.gz: 7eaaa915fdce69e8efc10a47f00c6a89b43ae8d4
5
5
  SHA512:
6
- metadata.gz: 449fcad702cabb66afcf7efc12db3898275c8524d25f1d6fd99a3a5f86e7239be0ecf205cc13562b3d375747d29c5eda24e456940d90f12000f194fde677c6c2
7
- data.tar.gz: 633073663835c6b2175a680cf17a8d9a629c4380b909b579ea4f61433b35e8d42d06eb0f940e8c8fe2207c8ea1507ccf79695a684d16a31b851df64511f3d86d
6
+ metadata.gz: 120864584083eaae0344c6d3319a36f2cbbcad290a39cf0098eaba8e18939128b17dccc516b178db9ffcba185a1f3cbf08bb2ba9f3e03d30f55286d488921c66
7
+ data.tar.gz: 28ca84e05b9145afaf2b1fad144aed9e8f2dd3fbc56a9a6cc100deb2c455544b20c67354df7eb7af96db2d8ea3addda3dae622053f81a4ecc1918179d857f514
data/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@
5
5
 
6
6
  ## Rails 3.2.13 (Feb 17, 2013) ##
7
7
 
8
+ * Fix incorrectly appended square brackets to a multiple select box
9
+ if an explicit name has been given and it already ends with "[]".
10
+
11
+ Before:
12
+
13
+ select(:category, [], {}, multiple: true, name: "post[category][]")
14
+ # => <select name="post[category][][]" ...>
15
+
16
+ After:
17
+
18
+ select(:category, [], {}, multiple: true, name: "post[category][]")
19
+ # => <select name="post[category][]" ...>
20
+
21
+ Backport #9616.
22
+
23
+ *Olek Janiszewski*
24
+
8
25
  * Determine the controller#action from only the matched path when using the
9
26
  shorthand syntax. Previously the complete path was used, which led
10
27
  to problems with nesting (scopes and namespaces).
@@ -66,7 +66,7 @@ module HTML
66
66
 
67
67
  # A regular expression of the valid characters used to separate protocols like
68
68
  # the ':' in 'http://foo.com'
69
- self.protocol_separator = /:|(&#0*58)|(&#x70)|(%|&#37;)3A/
69
+ self.protocol_separator = /:|(&#0*58)|(&#x70)|(&#x0*3a)|(%|&#37;)3A/i
70
70
 
71
71
  # Specifies a Set of HTML attributes that can have URIs.
72
72
  self.uri_attributes = Set.new(%w(href src cite action longdesc xlink:href lowsrc))
@@ -110,8 +110,8 @@ module HTML
110
110
  style = style.to_s.gsub(/url\s*\(\s*[^\s)]+?\s*\)\s*/, ' ')
111
111
 
112
112
  # gauntlet
113
- if style !~ /^([:,;#%.\sa-zA-Z0-9!]|\w-\w|\'[\s\w]+\'|\"[\s\w]+\"|\([\d,\s]+\))*$/ ||
114
- style !~ /^(\s*[-\w]+\s*:\s*[^:;]*(;|$)\s*)*$/
113
+ if style !~ /\A([:,;#%.\sa-zA-Z0-9!]|\w-\w|\'[\s\w]+\'|\"[\s\w]+\"|\([\d,\s]+\))*\z/ ||
114
+ style !~ /\A(\s*[-\w]+\s*:\s*[^:;]*(;|$)\s*)*\z/
115
115
  return ''
116
116
  end
117
117
 
@@ -122,7 +122,7 @@ module HTML
122
122
  elsif shorthand_css_properties.include?(prop.split('-')[0].downcase)
123
123
  unless val.split().any? do |keyword|
124
124
  !allowed_css_keywords.include?(keyword) &&
125
- keyword !~ /^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$/
125
+ keyword !~ /\A(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)\z/
126
126
  end
127
127
  clean << prop + ': ' + val + ';'
128
128
  end
@@ -171,7 +171,7 @@ module HTML
171
171
 
172
172
  def contains_bad_protocols?(attr_name, value)
173
173
  uri_attributes.include?(attr_name) &&
174
- (value =~ /(^[^\/:]*):|(&#0*58)|(&#x70)|(%|&#37;)3A/ && !allowed_protocols.include?(value.split(protocol_separator).first.downcase))
174
+ (value =~ /(^[^\/:]*):|(&#0*58)|(&#x70)|(&#x0*3a)|(%|&#37;)3A/i && !allowed_protocols.include?(value.split(protocol_separator).first.downcase.strip))
175
175
  end
176
176
  end
177
177
  end
@@ -3,7 +3,7 @@ module ActionPack
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
5
  TINY = 13
6
- PRE = "rc2"
6
+ PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
@@ -1207,7 +1207,7 @@ module ActionView
1207
1207
  options["id"] = options.fetch("id"){ tag_id }
1208
1208
  end
1209
1209
 
1210
- options["name"] += "[]" if options["multiple"]
1210
+ options["name"] += "[]" if options["multiple"] && !options["name"].ends_with?("[]")
1211
1211
  options["id"] = [options.delete('namespace'), options["id"]].compact.join("_").presence
1212
1212
  end
1213
1213
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.13.rc2
4
+ version: 3.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-06 00:00:00.000000000 Z
11
+ date: 2013-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.13.rc2
19
+ version: 3.2.13
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.13.rc2
26
+ version: 3.2.13
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.13.rc2
33
+ version: 3.2.13
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.2.13.rc2
40
+ version: 3.2.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-cache
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -362,9 +362,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
362
362
  version: 1.8.7
363
363
  required_rubygems_version: !ruby/object:Gem::Requirement
364
364
  requirements:
365
- - - '>'
365
+ - - '>='
366
366
  - !ruby/object:Gem::Version
367
- version: 1.3.1
367
+ version: '0'
368
368
  requirements:
369
369
  - none
370
370
  rubyforge_project: