activesupport 3.0.16 → 3.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG
CHANGED
|
@@ -3,13 +3,13 @@ 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
9
|
# A utility method for escaping HTML tag characters.
|
|
10
10
|
# This method is also aliased as <tt>h</tt>.
|
|
11
11
|
#
|
|
12
|
-
# In your
|
|
12
|
+
# In your ERB templates, use this method to escape any unsafe content. For example:
|
|
13
13
|
# <%=h @person.name %>
|
|
14
14
|
#
|
|
15
15
|
# ==== Example:
|
|
@@ -20,7 +20,7 @@ class ERB
|
|
|
20
20
|
if s.html_safe?
|
|
21
21
|
s
|
|
22
22
|
else
|
|
23
|
-
s.
|
|
23
|
+
s.gsub(/[&"'><]/n) { |special| HTML_ESCAPE[special] }.html_safe
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
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.0.
|
|
4
|
+
version: 3.0.17
|
|
5
5
|
prerelease:
|
|
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-
|
|
12
|
+
date: 2012-08-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
|
15
15
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
|
@@ -246,9 +246,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
246
246
|
- - ! '>='
|
|
247
247
|
- !ruby/object:Gem::Version
|
|
248
248
|
version: '0'
|
|
249
|
+
segments:
|
|
250
|
+
- 0
|
|
251
|
+
hash: -2545111425282888453
|
|
249
252
|
requirements: []
|
|
250
253
|
rubyforge_project: activesupport
|
|
251
|
-
rubygems_version: 1.8.
|
|
254
|
+
rubygems_version: 1.8.24
|
|
252
255
|
signing_key:
|
|
253
256
|
specification_version: 3
|
|
254
257
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|