activesupport 2.3.6 → 2.3.7

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 CHANGED
@@ -1,3 +1,8 @@
1
+ *2.3.7 (May 24, 2010)*
2
+
3
+ * HTML safety: fix compatibility with the optional rails_xss plugin. [Nathan Weizenbaum, Santiago Pastorino]
4
+
5
+
1
6
  *2.3.6 (May 23, 2010)*
2
7
 
3
8
  * 1.9 compat: deprecated last_(month|year) in favor of prev_(month|year). [fxn]
@@ -1,22 +1,6 @@
1
1
  require 'erb'
2
2
 
3
3
  class ERB
4
- undef :set_eoutvar
5
- def set_eoutvar(compiler, eoutvar = '_erbout')
6
- compiler.put_cmd = "#{eoutvar}.safe_concat"
7
- compiler.insert_cmd = "#{eoutvar}.safe_concat"
8
-
9
- cmd = []
10
- cmd.push "#{eoutvar} = ActiveSupport::SafeBuffer.new"
11
-
12
- compiler.pre_cmd = cmd
13
-
14
- cmd = []
15
- cmd.push(eoutvar)
16
-
17
- compiler.post_cmd = cmd
18
- end
19
-
20
4
  module Util
21
5
  HTML_ESCAPE = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;' }
22
6
  JSON_ESCAPE = { '&' => '\u0026', '>' => '\u003E', '<' => '\u003C' }
@@ -112,7 +96,7 @@ module ActiveSupport #:nodoc:
112
96
  end
113
97
 
114
98
  class String
115
- alias_method :add_without_safety, :+
99
+ alias safe_concat concat
116
100
 
117
101
  def as_str
118
102
  self
@@ -123,38 +107,6 @@ class String
123
107
  end
124
108
 
125
109
  def html_safe?
126
- defined?(@_rails_html_safe)
127
- end
128
-
129
- def html_safe!
130
- ActiveSupport::Deprecation.warn("Use html_safe with your strings instead of html_safe! See http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/ for the full story.", caller)
131
- @_rails_html_safe = true
132
- self
133
- end
134
-
135
- def add_with_safety(other)
136
- result = add_without_safety(other)
137
- if html_safe? && also_html_safe?(other)
138
- result.html_safe!
139
- else
140
- result
141
- end
142
- end
143
- alias_method :+, :add_with_safety
144
-
145
- def concat_with_safety(other_or_fixnum)
146
- result = concat_without_safety(other_or_fixnum)
147
- unless html_safe? && also_html_safe?(other_or_fixnum)
148
- remove_instance_variable(:@_rails_html_safe) if defined?(@_rails_html_safe)
149
- end
150
- result
110
+ false
151
111
  end
152
- alias_method_chain :concat, :safety
153
- undef_method :<<
154
- alias_method :<<, :concat_with_safety
155
-
156
- private
157
- def also_html_safe?(other)
158
- other.respond_to?(:html_safe?) && other.html_safe?
159
- end
160
112
  end
@@ -2,7 +2,7 @@ module ActiveSupport
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 3
5
- TINY = 6
5
+ TINY = 7
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 3
8
- - 6
9
- version: 2.3.6
8
+ - 7
9
+ version: 2.3.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Heinemeier Hansson
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-23 00:00:00 -07:00
17
+ date: 2010-05-24 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20