activesupport 3.2.8.rc1 → 3.2.8.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
data/CHANGELOG.md
CHANGED
@@ -3,11 +3,10 @@ require 'active_support/core_ext/kernel/singleton_class'
|
|
3
3
|
|
4
4
|
class ERB
|
5
5
|
module Util
|
6
|
-
HTML_ESCAPE = { '&' => '&', '>' => '>', '<' => '<', '"' => '"' }
|
6
|
+
HTML_ESCAPE = { '&' => '&', '>' => '>', '<' => '<', '"' => '"', "'" => ''' }
|
7
7
|
JSON_ESCAPE = { '&' => '\u0026', '>' => '\u003E', '<' => '\u003C' }
|
8
8
|
|
9
|
-
|
10
|
-
if '"><&""' == ('><&"'.encode('utf-8', :xml => :attr) rescue false)
|
9
|
+
if RUBY_VERSION >= '1.9'
|
11
10
|
# A utility method for escaping HTML tag characters.
|
12
11
|
# This method is also aliased as <tt>h</tt>.
|
13
12
|
#
|
@@ -22,7 +21,7 @@ class ERB
|
|
22
21
|
if s.html_safe?
|
23
22
|
s
|
24
23
|
else
|
25
|
-
s.
|
24
|
+
s.gsub(/[&"'><]/, HTML_ESCAPE).html_safe
|
26
25
|
end
|
27
26
|
end
|
28
27
|
else
|
@@ -31,7 +30,7 @@ class ERB
|
|
31
30
|
if s.html_safe?
|
32
31
|
s
|
33
32
|
else
|
34
|
-
s.gsub(/[&"><]/n) { |special| HTML_ESCAPE[special] }.html_safe
|
33
|
+
s.gsub(/[&"'><]/n) { |special| HTML_ESCAPE[special] }.html_safe
|
35
34
|
end
|
36
35
|
end
|
37
36
|
end
|
@@ -104,8 +104,10 @@ module ActiveSupport
|
|
104
104
|
if respond_to?(:mocha_verify) # using mocha
|
105
105
|
if defined?(Mocha::TestCaseAdapter::AssertionCounter)
|
106
106
|
Mocha::TestCaseAdapter::AssertionCounter.new(result)
|
107
|
-
|
107
|
+
elsif defined?(Mocha::Integration::TestUnit::AssertionCounter)
|
108
108
|
Mocha::Integration::TestUnit::AssertionCounter.new(result)
|
109
|
+
else
|
110
|
+
Mocha::MonkeyPatching::TestUnit::AssertionCounter.new(result)
|
109
111
|
end
|
110
112
|
end
|
111
113
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.8.
|
4
|
+
version: 3.2.8.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|