プロジェクト

全般

プロフィール

Vote #67387

完了

Bad URL parsing in the wiki when it ends with right-angle-bracket(greater-than mark).

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

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2010/06/08
期日:
進捗率:

100%

予定工数:
category_id:
1
version_id:
25
issue_org_id:
5652
author_id:
4134
assigned_to_id:
1188
comments:
5
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
24
ステータス-->[Closed]

説明

When I write an URL and angle-bracket around the URL like below, the parsing is not correct. The bracket should not be included in the URL.

http://www.redmine.org/

Refers to the RFC2396,

The angle-bracket "<" and ">" and double-quote (") characters are
excluded because they are often used as the delimiters around URI in
text documents and protocol fields.


journals

Thanks for reporting, I 100% agree..

When trying to look at this, I ran into the following problem : @Redmine::WikiFormatting::Textile::Formatter#inline_auto_link@ method runs after textile parsing, so it receives something like @http://www.redmine.org/&gt;@ which is completely valid regarding the RFC.

If we don't want to do hacky things (and introduce a risk to not parse some valid urls correctly), we shoud change the way auto links are parsed : it should happen before textile, and they should be turned into standard textile links. But it can break so many things it should be *heavily* tested.

I'll try to investigate this tomorrow.
--------------------------------------------------------------------------------
Oops, my previous message was not so clear : "it receives something like @http://www.redmine.org/&amp;gt;@

And it may not be valid regarding the RFC, but it at least only contains valid characters so it's difficult to parse it. We could find more problematic examples, like @http://www.example.net/?page=blah>@, which would be textilized to @http://www.example.net/?page=blah&amp;gt;@, then parse with redmine auto links...
--------------------------------------------------------------------------------
Hi, Jean-Baptiste.

In our case, we often angle-bracket around a url if it is very long or contains some multi-byte chars. I think someone others may also have this issue.

Hope it will be fixed :)

Thanks for your investigation and I will also do some check for the redmine source, although I'm a beginner of rails :)
--------------------------------------------------------------------------------
I realized that @&amp;gt;@ shouldn't occur in the end of standard urls. Moreover wrapping links in angle brackets is a common practice, so we can introduce a specific case for that. Patch committed in r4287.
--------------------------------------------------------------------------------
Merged into 1.0-stable for release in 1.0.3
--------------------------------------------------------------------------------

Admin Redmine さんが4年以上前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン1.0.3_25 にセット

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

いいね!0
いいね!0