lib/lotus/view/rendering/scope.rb in lotus-view-0.3.0 vs lib/lotus/view/rendering/scope.rb in lotus-view-0.4.0

- old
+ new

@@ -1,5 +1,6 @@ +require 'lotus/utils/escape' require 'lotus/view/rendering/layout_scope' require 'lotus/view/rendering/template' require 'lotus/view/rendering/partial' module Lotus @@ -57,16 +58,18 @@ @locals.key?(m) end protected def method_missing(m, *args, &block) - if @view.respond_to?(m) - @view.__send__ m, *args, &block - elsif @locals.key?(m) - @locals[m] - else - super - end + ::Lotus::View::Escape.html( + if @view.respond_to?(m) + @view.__send__ m, *args, &block + elsif @locals.key?(m) + @locals[m] + else + super + end + ) end end end end end