https://www.redmine.org/
https://www.redmine.org/favicon.ico?1679302129
2019-01-23T06:25:19Z
Redmine
Redmine - Defect #30371: Textile formatter generates broken link if a URL is followed by a tag
https://www.redmine.org/issues/30371?journal_id=89597
2019-01-23T06:25:19Z
Yuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/22285">0001-Remove-unnecessary-trailing-white-spaces.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22285/0001-Remove-unnecessary-trailing-white-spaces.patch">0001-Remove-unnecessary-trailing-white-spaces.patch</a> added</li><li><strong>File</strong> <a href="/attachments/22286">0002-URL-followed-by-tag.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22286/0002-URL-followed-by-tag.patch">0002-URL-followed-by-tag.patch</a> added</li></ul><p>I improved the regular expression to exclude subsequent characters on "&lt;" from a URL.<br />I attached patches.<br /><pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb
index 66764551d..8bd8f64bc 100644
</span><span class="gd">--- a/lib/redmine/wiki_formatting.rb
</span><span class="gi">+++ b/lib/redmine/wiki_formatting.rb
</span><span class="p">@@ -126,7 +126,7 @@</span> module Redmine
(\/)? # slash
)
((?:&gt;)?|[^[:alnum:]_\=\/;\(\)]*?) # post
<span class="gd">- (?=<|\s|$)
</span><span class="gi">+ (?=&lt;|<|\s|$)
</span> }x unless const_defined?(:AUTO_LINK_RE)
# Destructively replaces urls into clickable links
<span class="gh">diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index 9107da611..ff0621b9f 100644
</span><span class="gd">--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
</span><span class="gi">+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
</span><span class="p">@@ -830,7 +830,7 @@</span> class RedCloth3 < String
(\/)? # $slash
([^[:alnum:]_\=\/;\(\)]*?) # $post
)
<span class="gd">- (?=<|\s|$)
</span><span class="gi">+ (?=&lt;|<|\s|$)
</span> /x
#"
def inline_textile_link( text )
</code></pre></p>
Redmine - Defect #30371: Textile formatter generates broken link if a URL is followed by a tag
https://www.redmine.org/issues/30371?journal_id=89602
2019-01-23T13:31:55Z
Go MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul>