From 8a998b0fa7523c2c8eb6d0cf56e40408bf6e9b2e Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 5 Jan 2016 16:48:09 -0300 Subject: Add Html template handler that wraps Raw output in an OutputBuffer This fixes the case when you try to render an html you know safe and the file is named something.html. With this commit the content of the html won't be escaped anymore because AV won't use Raw handler and choose Html handler instead. --- actionview/test/fixtures/layouts/render_partial_html.erb | 2 ++ actionview/test/fixtures/test/_partialhtml.html | 1 + 2 files changed, 3 insertions(+) create mode 100644 actionview/test/fixtures/layouts/render_partial_html.erb create mode 100644 actionview/test/fixtures/test/_partialhtml.html (limited to 'actionview/test/fixtures') diff --git a/actionview/test/fixtures/layouts/render_partial_html.erb b/actionview/test/fixtures/layouts/render_partial_html.erb new file mode 100644 index 0000000000..d4dbb6c76c --- /dev/null +++ b/actionview/test/fixtures/layouts/render_partial_html.erb @@ -0,0 +1,2 @@ +<%= render :partial => 'test/partialhtml' %> +<%= yield %> diff --git a/actionview/test/fixtures/test/_partialhtml.html b/actionview/test/fixtures/test/_partialhtml.html new file mode 100644 index 0000000000..afe39b730a --- /dev/null +++ b/actionview/test/fixtures/test/_partialhtml.html @@ -0,0 +1 @@ +

partial html

\ No newline at end of file -- cgit v1.2.3