diff --git a/app/views/layouts/error.html.erb b/app/views/layouts/error.html.erb index cbdd1596..5c03dfce 100644 --- a/app/views/layouts/error.html.erb +++ b/app/views/layouts/error.html.erb @@ -31,7 +31,11 @@
-<%= h @content_for_layout %> +<%= if :raw + @content_for_layout + else + h @content_for_layout + end %>
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index ebd1166d..c63d4019 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -765,6 +765,11 @@ class WikiControllerTest < ActionController::TestCase 'author' => 'AuthorOfNewPage' assert_equal 403, r.response_code + resp = %{

Access denied. Your IP address, 127.0.0.2, was found on one or more DNSBL blocking } + + %{list(s).

\n

See here for more information.

\n

See here for more information.

\n} + assert_match Regexp.new(Regexp.escape(resp)), r.body end def test_dnsbl_filter_allow_action diff --git a/vendor/plugins/dnsbl_check/lib/dnsbl_check.rb b/vendor/plugins/dnsbl_check/lib/dnsbl_check.rb index a3bd44d1..c1ab3b06 100644 --- a/vendor/plugins/dnsbl_check/lib/dnsbl_check.rb +++ b/vendor/plugins/dnsbl_check/lib/dnsbl_check.rb @@ -45,7 +45,7 @@ module DNSBL_Check addr = Resolv.getaddress("#{host}") rescue '' if addr[0,7]=="127.0.0" logger.info("#{request.remote_addr} found using DNSBL #{host}") - ban_help << " See here for more information." + ban_help << "\n

See here for more information.

" passed = false end end @@ -58,8 +58,8 @@ module DNSBL_Check $dnsbl_passed.push request.remote_addr logger.warn("#{request.remote_addr} added to DNSBL passed cache") else - render( :text => "Access denied. Your IP address, #{request.remote_addr}, was found on one or more DNSBL" + - " blocking list(s).#{ban_help}", :status => 403, :layout => 'error') + render( :text => "

Access denied. Your IP address, #{request.remote_addr}, was found on one or more DNSBL" + + " blocking list(s).

#{ban_help}", :status => 403, :layout => 'error', :locals => {:raw => true}) return false end end