Vote #79724
完了URLs end with "-" are rendered incorrectly in Textile
0%
説明
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.
--------------------------------------------------------------------------------