From 6f8403a502b957033b67aa37ee314d083ac28a90 Mon Sep 17 00:00:00 2001 From: Joel Drapper Date: Fri, 6 Sep 2024 22:44:17 +0100 Subject: [PATCH] ActiveSupport::SafeBuffer should be a SafeObject --- lib/phlex/rails.rb | 2 ++ lib/phlex/rails/layout.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/phlex/rails.rb b/lib/phlex/rails.rb index 24c5c76..afa5a2f 100644 --- a/lib/phlex/rails.rb +++ b/lib/phlex/rails.rb @@ -32,4 +32,6 @@ module Rails HTML.extend Phlex::Rails::HTML::Format HTML.include Phlex::Rails::HTML::Format + + ActiveSupport::SafeBuffer.include(Phlex::SGML::SafeObject) end diff --git a/lib/phlex/rails/layout.rb b/lib/phlex/rails/layout.rb index ded86ff..39d08a5 100644 --- a/lib/phlex/rails/layout.rb +++ b/lib/phlex/rails/layout.rb @@ -57,7 +57,7 @@ def render(view_context, *args, **kwargs, &block) output = view_context.capture(&block) end - unsafe_raw output + raw output end end end