プロジェクト

全般

プロフィール

Vote #79724

完了

URLs end with "-" are rendered incorrectly in Textile

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

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

0%

予定工数:
category_id:
26
version_id:
127
issue_org_id:
30259
author_id:
151490
assigned_to_id:
332
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Last character "-" makes wrong link
please add link "-" character

for example googledrive use "-"

ja---

概要、説明、注記等で、URLリンクの最後の文字が "-"だった場合
リンク扱いとならず、誤ったリンクとなる
グーグルドライブなどは、最終文字が "-" となることがあり、修正してほしいです

画像も参照してください


journals

confirmed the problem. This issue is reproducible in Textile. Markdown is not affected.

*Input:*
<pre>
http://example.com/foo-
</pre>

*Expected output:*
<pre>
<a class="external" href="http://example.com/foo-">http://example.com/foo-</a>
</pre>

*Actual output:*
<pre>
<a class="external" href="http://example.com/foo">http://example.com/foo</a>-
</pre>
--------------------------------------------------------------------------------
I reviewed the regular expression to interpret the trailing hyphens as URL.
I attached patches.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Same with ?, &, # and $ characters. These URL:
<pre>
https://example.org/ticket.form.php?id=333?
https://example.org/ticket.form.php?id=333&
https://example.org/TicketID=455#
https://example.org/TicketID=455$
</pre>
will be rendered (3.4.4.stable) as:

!output.trailing.special.characters.png!

For example the second link could be generated by "glpi":https://glpi-project.org/ tool and the third one is sometimes generated by "otrs":https://otrs.com/ tool. I think all four are valid characters at the end of an URL.
--------------------------------------------------------------------------------
Setting the target version to 4.0.2.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the patch. Thank you all for reporting and fixing this issue.
--------------------------------------------------------------------------------

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

  • カテゴリText formatting_26 にセット
  • 対象バージョン4.1.0_127 にセット

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

いいね!0
いいね!0