Project

General

Profile

Actions

Patch #27114

closed

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

Added by okkez _ over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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

<p><a href="mailto:n@">n@</a>. b</p>

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.


Files

make-robust.diff (1.2 KB) make-robust.diff okkez _, 2017-10-03 03:02
Actions

Also available in: Atom PDF