e3832c6f79
Upgrade to Rails 2.3.5. Also work around this bug: https://rails.lighthouseapp.com/projects/8994/tickets/3524 created by the aforementioned Rails release.
28 lines
No EOL
355 B
Ruby
28 lines
No EOL
355 B
Ruby
|
|
module ActionView #:nodoc:
|
|
class SafeBuffer < String
|
|
def <<(value)
|
|
if value.html_safe?
|
|
super(value)
|
|
else
|
|
super(ERB::Util.h(value))
|
|
end
|
|
end
|
|
|
|
def concat(value)
|
|
self << value
|
|
end
|
|
|
|
def html_safe?
|
|
true
|
|
end
|
|
|
|
def html_safe!
|
|
self
|
|
end
|
|
|
|
def to_s
|
|
self
|
|
end
|
|
end
|
|
end |