instiki/vendor/rails/actionpack/lib/action_view/safe_buffer.rb
Jacques Distler e3832c6f79 Rails 2.3.5
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.
2009-11-30 19:38:34 -06:00

28 lines
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