summaryrefslogtreecommitdiff
path: root/app/helpers/safe_format_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/safe_format_helper.rb')
-rw-r--r--app/helpers/safe_format_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/safe_format_helper.rb b/app/helpers/safe_format_helper.rb
index c79e8b50a1a..f05cf5ab50f 100644
--- a/app/helpers/safe_format_helper.rb
+++ b/app/helpers/safe_format_helper.rb
@@ -15,7 +15,8 @@ module SafeFormatHelper
def safe_format(format, **args)
raise ArgumentError, 'Argument `format` must not be marked as html_safe!' if format.html_safe?
- format(
+ # Use `Kernel.format` to avoid conflicts with ViewComponent's `format`.
+ Kernel.format(
html_escape(format),
args.transform_values { |value| html_escape(value) }
).html_safe