diff --git a/app/helpers/user_notifications_helper.rb b/app/helpers/user_notifications_helper.rb index 05df6b1298e..320b7f7ce85 100644 --- a/app/helpers/user_notifications_helper.rb +++ b/app/helpers/user_notifications_helper.rb @@ -54,11 +54,15 @@ module UserNotificationsHelper raw format_for_email(html) end + def sanitized_name(name) + name.downcase.gsub(/[\s_-]/, '') + end + def show_name_on_post(post) SiteSetting.enable_names? && SiteSetting.display_name_on_posts? && post.user.name.present? && - post.user.name != post.user.username + sanitized_name(post.user.name) != sanitized_name(post.user.username) end def format_for_email(html)