プロジェクト

全般

プロフィール

Vote #79907

未完了

Fullwidth characters enclosed in "<" and ">" are removed in email notifications

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Confirmed
優先度:
通常
担当者:
-
カテゴリ:
Email notifications_9
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
9
version_id:
0
issue_org_id:
31021
author_id:
390500
assigned_to_id:
0
comments:
8
status_id:
9
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
143
ステータス-->[Confirmed]

説明

Hi, I'm using Redmine ver.3.4.7 and multi-byte environment(Japanese).

I found a bug in mail notifications function.
When I update a ticket with the comments below


aaaccc

AAA<BBB>CCC

The less-than sign, grater-than sign, and multi-byte "BBB" are deleted in the mail, while the ticket itself is properly updated.
Note that the first sentence is written using single-byte characters, and the second one is written using multi-byte characters except less-than sign(<) and grater-than sign(>).

It will not happen when the letters are quoted with < pre > and < /pre >.
Neither It will not happen when html mail is not used.

See the attached for details.


journals

I cannot reproduce the problem in the current trunk (Redmine 4.0.2.devel.17938). I will check with 3.4 later.

!{border: 1px solid #ccc; width: 393px}.email-4.png!
--------------------------------------------------------------------------------
Maeda-san,
Thanks for prompt response and trying to reproduce.

I forgot saying this but if characters are all single-byte in < and >, the bug will not happen.
It happens only when the characters include multi-byte characters.

Please try using my sample in description section.
<pre>
aaa<bbb>ccc
AAA<BBB>CCC
</pre>
--------------------------------------------------------------------------------
Masaomi Yoshida wrote:
> It happens only when the characters include multi-byte characters.

Thank you for pointing it out. I have confirmed that the issue is reproducible in the current trunk.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Escape processing of "<" and ">" is performed by @RedCloth3#escape_html_tags@ .
source:/trunk/lib/redmine/wiki_formatting/textile/redcloth3.rb#L1218

However, full-width characters could not be processed because they do not match the regular expression "@\w@".
Change the regular expression "@\w@" to "@_@" and "@[[:alnum:]]@" to match even full-width characters.

I attached the patches.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I tested the patch and found that the problem still remains for strings such as "<###>" and "<あいうえお>".
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリEmail notifications_9 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0