プロジェクト

全般

プロフィール

Vote #78848

完了

Make robust Redmine::Helpers::URL#uri_with_safe_scheme?

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

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

0%

予定工数:
category_id:
26
version_id:
99
issue_org_id:
27114
author_id:
750
assigned_to_id:
332
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I'm developing new formatter for CommonMark.

commonmarker gem will create wrong autolink like https://github.com/github/cmark/issues/57 .

n@.  b

will convert to

n@. b

This causes URI::InvalidComponentError.

And I test with Redmine 3.4.2's Markdown formatter with following text.

[a@](a@)

This also causes URI::InvalidComponentError.

I wrote some patches to avoid these errors.


journals

I observed the following error when the exception class at source:tags/3.4.2/lib/redmine/helpers/url.rb#L30 is URI::InvalidURIError.
Setting target version to 4.0.0.

<pre>
$ ruby test/unit/lib/redmine/helpers/url_test.rb
Run options: --seed 58810

# Running:

.E

Error:
URLTest#test_uri_with_safe_scheme_invalid_component:
URI::InvalidComponentError: unrecognised opaque part for mailtoURL: root@
lib/redmine/helpers/url.rb:29:in `uri_with_safe_scheme?'
test/unit/lib/redmine/helpers/url_test.rb:15:in `test_uri_with_safe_scheme_invalid_component'
</pre>
--------------------------------------------------------------------------------
Committed in the trunk. Thank you for your contribution.
--------------------------------------------------------------------------------

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

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

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

いいね!0
いいね!0