summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-10 11:37:38 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-10 11:37:38 +0000
commit505981c6824e0133ba2718e4d5e1f4c277a4e900 (patch)
tree2b1aa427c32cff57de4b42c2591c00e26313ad12 /app/helpers
parentecee8ccabaefc131622638c50035bf77e92b7597 (diff)
downloadredmine-505981c6824e0133ba2718e4d5e1f4c277a4e900.tar.gz
redmine-505981c6824e0133ba2718e4d5e1f4c277a4e900.zip
Fixes double-escaping issue for a principal name with special chars (#41721, #23980).
Patch by Katsuya HIDAKA (user:hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23228 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 4a02d8376..806d59da1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -60,23 +60,23 @@ module ApplicationHelper
only_path = options[:only_path].nil? ? true : options[:only_path]
case principal
when User
- name = h(principal.name(options[:format]))
- name = "@".html_safe + name if options[:mention]
+ name = principal.name(options[:format])
+ name = "@#{name}" if options[:mention]
css_classes = ''
if principal.active? || (User.current.admin? && principal.logged?)
url = user_url(principal, :only_path => only_path)
css_classes += principal.css_classes
end
when Group
- name = h(principal.to_s)
+ name = principal.to_s
url = group_url(principal, :only_path => only_path)
css_classes = principal.css_classes
else
- name = h(principal.to_s)
+ name = principal.to_s
end
css_classes += " #{options[:class]}" if css_classes && options[:class].present?
- url ? link_to(principal_icon(principal.class.name.downcase).to_s + name, url, :class => css_classes) : name
+ url ? link_to(principal_icon(principal.class.name.downcase).to_s + name, url, :class => css_classes) : h(name)
end
# Displays a link to edit group page if current user is admin