プロジェクト

全般

プロフィール

Vote #79750

未完了

Textile formatter generates broken link if a URL is followed by a tag

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
33
issue_org_id:
30371
author_id:
332
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

[Input]

http://www.example.com/

[Expected output]

http://www.example.com/<foo>

[Actual output]

http://www.example.com/&lt;foo

!{width: 256px; border: 1px solid #ccc;}.broken-link@2x.png!


journals

I improved the regular expression to exclude subsequent characters on "&amp;lt;" from a URL.
I attached patches.
<pre><code class="diff">
diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb
index 66764551d..8bd8f64bc 100644
--- a/lib/redmine/wiki_formatting.rb
+++ b/lib/redmine/wiki_formatting.rb
@@ -126,7 +126,7 @@ module Redmine
(\/)? # slash
)
((?:&gt;)?|[^[:alnum:]_\=\/;\(\)]*?) # post
- (?=<|\s|$)
+ (?=&lt;|<|\s|$)
}x unless const_defined?(:AUTO_LINK_RE)

# Destructively replaces urls into clickable links
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index 9107da611..ff0621b9f 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -830,7 +830,7 @@ class RedCloth3 < String
(\/)? # $slash
([^[:alnum:]_\=\/;\(\)]*?) # $post
)
- (?=<|\s|$)
+ (?=&lt;|<|\s|$)
/x
#"
def inline_textile_link( text )
</code></pre>

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

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

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

  • カテゴリText formatting_26 にセット
  • 対象バージョンCandidate for next minor release_33 にセット

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

いいね!0
いいね!0