From a8ea724b92bd6cc97c2e3b34b6638454918a63c9 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Sun, 8 Apr 2018 07:36:10 +0000 Subject: [PATCH] user link syntax should work also with logins in upper case --- app/helpers/application_helper.rb | 2 +- test/helpers/application_helper_test.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9da044c..bffea20 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1010,7 +1010,7 @@ module ApplicationHelper )| ( (?@) - (?[a-z0-9_\-@\.]*) + (?[A-Za-z0-9_\-@\.]*) ) ) (?= diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index ca2407d..c5b5518 100755 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -391,8 +391,10 @@ RAW "http://foo.bar/FAQ#3" => 'http://foo.bar/FAQ#3', # user 'user:jsmith' => link_to_user(User.find_by_id(2)), + 'user:JSMITH' => link_to_user(User.find_by_id(2)), 'user#2' => link_to_user(User.find_by_id(2)), '@jsmith' => link_to_user(User.find_by_id(2)), + '@JSMITH' => link_to_user(User.find_by_id(2)), '@abcd@example.com' => link_to_user(User.find_by_id(u_email_id)), 'user:abcd@example.com' => link_to_user(User.find_by_id(u_email_id)), '@foo.bar@example.com' => link_to_user(User.find_by_id(u_email_id_2)), -- 2.1.4