mirror of
https://github.com/github/rails.git
synced 2026-01-12 08:08:31 -05:00
Compare commits
7 Commits
github45
...
2-3-github
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de40f7d9e3 | ||
|
|
1d5bb4fd20 | ||
|
|
52abaed4b3 | ||
|
|
5b0053b2a8 | ||
|
|
1b98a0d72f | ||
|
|
1f59a8dfe8 | ||
|
|
e1011ea095 |
@@ -1 +1 @@
|
||||
2.3.14.github45
|
||||
2.3.14.github46.htmlsafehax
|
||||
|
||||
@@ -55,7 +55,7 @@ module ActionController
|
||||
|
||||
def [](key)
|
||||
load_for_read!
|
||||
super(key.to_s) || super(key)
|
||||
fetch(key.to_s, super(key))
|
||||
end
|
||||
|
||||
def has_key?(key)
|
||||
@@ -82,14 +82,19 @@ module ActionController
|
||||
|
||||
def update(hash)
|
||||
load_for_write!
|
||||
super
|
||||
super(hash.stringify_keys)
|
||||
end
|
||||
|
||||
def delete(key)
|
||||
load_for_write!
|
||||
value = super(key)
|
||||
string_value = super(key.to_s)
|
||||
string_value || value
|
||||
if has_key? key
|
||||
value = self[key]
|
||||
super(key)
|
||||
super(key.to_s)
|
||||
value
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def data
|
||||
|
||||
@@ -126,9 +126,7 @@ module ActiveSupport #:nodoc:
|
||||
super
|
||||
else
|
||||
if html_safe?
|
||||
new_safe_buffer = super
|
||||
new_safe_buffer.instance_eval { @html_safe = true }
|
||||
new_safe_buffer
|
||||
super._gh_html_safe!
|
||||
else
|
||||
to_str[*args]
|
||||
end
|
||||
@@ -136,18 +134,18 @@ module ActiveSupport #:nodoc:
|
||||
end
|
||||
|
||||
def safe_concat(value)
|
||||
raise SafeConcatError unless @html_safe
|
||||
raise SafeConcatError unless html_safe?
|
||||
original_concat(value)
|
||||
end
|
||||
|
||||
def initialize(*)
|
||||
@html_safe = true
|
||||
_gh_html_safe!
|
||||
super
|
||||
end
|
||||
|
||||
def initialize_copy(other)
|
||||
super
|
||||
@html_safe = other.html_safe?
|
||||
_gh_html_safe_if!(other)
|
||||
end
|
||||
|
||||
def clone_empty
|
||||
@@ -179,10 +177,6 @@ module ActiveSupport #:nodoc:
|
||||
self.class.new(super(args))
|
||||
end
|
||||
|
||||
def html_safe?
|
||||
defined?(@html_safe) && @html_safe
|
||||
end
|
||||
|
||||
def to_s
|
||||
self
|
||||
end
|
||||
@@ -204,7 +198,7 @@ module ActiveSupport #:nodoc:
|
||||
end # end
|
||||
|
||||
def #{unsafe_method}!(*args) # def capitalize!(*args)
|
||||
@html_safe = false # @html_safe = false
|
||||
_gh_unset_html_safe! # _gh_unset_html_safe!
|
||||
super # super
|
||||
end # end
|
||||
EOT
|
||||
|
||||
Reference in New Issue
Block a user