diff --git a/init.rb b/init.rb index b51197cf..b7210dd4 100644 --- a/init.rb +++ b/init.rb @@ -67,6 +67,4 @@ Redmine::Plugin.register :redmine_tweaks do if: proc { User.current.logged? && !RedmineTweaks.settings[:remove_mypage] } menu :admin_menu, :tweaks, { controller: 'settings', action: 'plugin', id: 'redmine_tweaks' }, caption: :label_tweaks - - RedCloth3::ALLOWED_TAGS << 'div' end diff --git a/lib/redmine_tweaks.rb b/lib/redmine_tweaks.rb old mode 100755 new mode 100644 diff --git a/lib/redmine_tweaks/wiki_macros/user_macro.rb b/lib/redmine_tweaks/wiki_macros/user_macro.rb index b56d677b..2f4de8a1 100644 --- a/lib/redmine_tweaks/wiki_macros/user_macro.rb +++ b/lib/redmine_tweaks/wiki_macros/user_macro.rb @@ -37,18 +37,17 @@ module RedmineTweaks user.name(options[:format].to_sym) end - s = '' + s = [] if !options[:avatar].blank? && options[:avatar] - s = avatar(user, size: 14) + s << avatar(user, size: 14) + ' ' end - s.html_safe << if user.active? - link_to(h(name), - user_path(user), - class: user.css_classes) - else - h(name) - end + s << if user.active? + link_to(h(name), user_path(user), class: user.css_classes) + else + h(name) + end + safe_join(s) end end end