Redmine - Defect #26443
User link syntax (user:login) doesn't work for logins consisting of an email adress
2017-07-14 21:22 - Mischa The Evil

ステータス:

Closed

開始日:

優先度:

Normal期日:担当者:

Marius B

カテゴリ:

Text formatting

対象バージョン:4.0.0

Resolution:

FixedLTEANU

進捗率:

0%

予定工数:

0.00時間Affected version:

3.4.0

説明
From #4179#note-69:
Vu Anh wrote:
Seem it isn't working well with syntax "user:abc@example.com" (Login name contain "@" character)I am able to confirm this issue. Important to note though, is that the short syntax (@login) works as it should.
I'll attach a patch which adds explicit test coverage for this issue. It showcases what works and, after re-enabling thecommented-out assertions, what currently fails.
Patch and confirmation against source:/trunk@16479 (though it is present on 3.4.1 too).
Environment:

Environment:
Redmine version
Ruby version
Rails version
Environment
Database adapter
SCM:
Subversion
GitFilesystem
Redmine plugins:no plugin installed

3.4.0.devel@r16479
2.3.3-p222 (2016-11-21)
4.2.8
production
Mysql2[x86̲64-linux]

1.8.8
1.9.1関連するチケット:
関連している Redmine - Feature #4179: Link to user in wiki syntax

Closed

ブロック先 Redmine - Defect #26507: "attachment:filename" link...

Closed

ブロック先 Redmine - Defect #26892: Link to user in wiki synta...

Closed2009-11-08

関係しているリビジョン
リビジョン 17392 - 2018-06-17 07:45 - Jean-Philippe Lang
User link syntax (user:login) doesn't work for logins consisting of an email adress (#26443).
Patch by Marius BALTEANU.

履歴#1 - 2017-07-14 21:22 - Mischa The Evil
- 関連している Feature #4179: Link to user in wiki syntax を追加#2 - 2017-07-15 13:06 - Marius BLTEANU

Thanks Mischa for opening this issue. I've already started work to a fix, but I found another issue (user logins with non alphanumeric characters like

2024-09-08

1/3

john.smith@foo.bar) on textile formatting and I need more time to fix all these issue. Unfortunately, only next week I'll have the time to continue
work on this.
#3 - 2017-07-24 00:22 - Marius B

LTEANU- ファイル 26443̲fix̲user̲link̲syntax.patch を追加
The attached patch fixes both issues.
Because I couldn't modify the regex to ignore the emails that starts with "@" or "user:", I chose to use the same logic from markdown formatting also
for textile.
Mischa The Evil, when I've implemented this feature, I didn't take into consideration the format user:"abcd@example.com".
@Jean-Philippe Lang, do you think that it'll be better to use the new method "restore̲user̲links!" also in the markdown/formatting.rb in order toavoid the almost duplicated regexes?
#4 - 2017-07-25 09:43 - Go MAEDA- 対象バージョン を 3.4.3 にセット
The patch attached in #26443#note-3 fixes this issue properly on the current trunk and 3.4-stable.
Setting target version to 3.4.3.
#5 - 2017-07-26 00:33 - Go MAEDA- ブロック先 Defect #26507: "attachment:filename" link syntax would not work if the file name contains "@" を追加#6 - 2017-07-30 18:49 - Jean-Philippe Lang
- 担当者 を Marius B

LTEANU にセット

Marius BALTEANU wrote:@Jean-Philippe Lang, do you think that it'll be better to use the new method "restore̲user̲links!" also in the markdown/formatting.rb in order
to avoid the almost duplicated regexes?

That would be nice indeed if we can use the same method.
#7 - 2017-08-06 09:45 - Marius B

LTEANU- ファイル 26443̲fix̲user̲link̲syntax.patch を追加
Jean-Philippe Lang wrote:
That would be nice indeed if we can use the same method.

Here it is the new patch. I chose to move all the restore redmine links from markdown to the new method because I do not see any side effect.
I'll add a new patch soon that improves the existing tests in order to be sure that all redmine links work on each text formatting (none, textile,markdown).
#8 - 2017-08-06 09:46 - Marius BLTEANU- ファイル を削除 (26443̲fix̲user̲link̲syntax.patch)#9 - 2017-08-06 09:52 - Marius B

LTEANU

Attached the correct patch. The previous one has an undesired change.
#10 - 2017-08-06 09:53 - Marius B

LTEANU- ファイル 26443̲fix̲user̲link̲syntax.patch を追加#11 - 2017-08-06 09:53 - Marius B

LTEANU- ファイル を削除 (26443̲fix̲user̲link̲syntax.patch)#12 - 2017-10-15 13:28 - Marius B

LTEANU

Just a technical note: An interesting approach is the html-pipeline used by GitHub which easily allows you to apply different filters ortransformations over the initial html. I like that the implementation looks very clean. Jean-Philippe Lang, do you find this approach interesting for a2024-09-08

2/3

future implementation in Redmine? I can work on this, but I want a validation first :)#13 - 2017-10-15 13:47 - Jean-Philippe Lang
- 対象バージョン を 3.4.3 から 4.0.0 に変更
Changes are rather large, setting target to a major version.
#14 - 2018-04-08 09:20 - Marius B

LTEANU- ファイル を削除 (26443̲fix̲user̲link̲syntax.patch)#15 - 2018-04-08 09:22 - Marius B

LTEANU- ファイル 26443̲fix̲user̲link̲syntax.patch を追加
Updated the patch to apply cleanly against current trunk (r17286).
#16 - 2018-04-08 09:37 - Marius B

LTEANU- ブロック先 Defect #26892: Link to user in wiki syntax only works when login is written in lower case を追加#17 - 2018-06-17 07:47 - Jean-Philippe Lang- ステータス を Confirmed から Closed に変更- Resolution を Fixed にセット
Patch committed, thanks Marius.
Marius BALTEANU wrote:
Just a technical note: An interesting approach is the html-pipeline used by GitHub which easily allows you to apply different filters ortransformations over the initial html. I like that the implementation looks very clean. Jean-Philippe Lang, do you find this approach interesting
for a future implementation in Redmine? I can work on this, but I want a validation first :)It looks very interesting indeed. That would be nice to see how we could benefit to using it.

ファイル
0001-Add-test-assertions-showcasing-the-issue.patch

1.81 KB

2017-07-14

26443̲fix̲user̲link̲syntax.patch

7.56 KB

2018-04-08

2024-09-08

Mischa The EvilMarius B

3/3

LTEANU