Browse Source

Fix user link using @ not working at the end of line (#34894).

Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@20936 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/5.0.0
Go MAEDA 3 years ago
parent
commit
b8d0541955
2 changed files with 2 additions and 1 deletions
  1. 1
    1
      app/helpers/application_helper.rb
  2. 1
    0
      test/helpers/application_helper_test.rb

+ 1
- 1
app/helpers/application_helper.rb View File

@@ -1283,7 +1283,7 @@ module ApplicationHelper
)|
(
(?<sep4>@)
(?<identifier3>[A-Za-z0-9_\-@\.]*)
(?<identifier3>[A-Za-z0-9_\-@\.]*?)
)
)
(?=

+ 1
- 0
test/helpers/application_helper_test.rb View File

@@ -521,6 +521,7 @@ class ApplicationHelperTest < Redmine::HelperTest
'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))}.",
'@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)),

Loading…
Cancel
Save