From 01557f9fc657b570e7e2eaf3cefb3dae009db0ad Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Fri, 7 Mar 2025 07:42:08 +0000 Subject: [PATCH] Merged r23519 from trunk to 6.0-stable (#42326). git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23524 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting/macros.rb | 2 +- test/unit/lib/redmine/wiki_formatting/macros_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb index 4de145c4c..ef1135cb6 100644 --- a/lib/redmine/wiki_formatting/macros.rb +++ b/lib/redmine/wiki_formatting/macros.rb @@ -53,7 +53,7 @@ module Redmine send(method_name, obj, args) end rescue => e - %|
#{::I18n.t(:error_can_not_execute_macro_html, :name => name, :error => e.to_s)}
|.html_safe + %|
#{::I18n.t(:error_can_not_execute_macro_html, :name => ::ERB::Util.h(name), :error => ::ERB::Util.h(e.to_s))}
|.html_safe end end diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index f23c76fdd..a41428266 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -140,12 +140,12 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest def test_macro_exception_should_be_displayed Redmine::WikiFormatting::Macros.macro :exception do |obj, args| - raise "My message" + raise "My exception's message" end text = "{{exception}}" assert_include( - '
Error executing the exception macro (My message)
', + '
Error executing the exception macro (My exception's message)
', textilizable(text) ) end