Defect #29172
closedMarkdown: External links broken
0%
Description
Scenario¶
- Open issue description / wiki / project description
- Add link containing special chars, like ✓
- Save
Result¶
- Link 1: [link](http://www.redmine.org/projects/redmine/issues?utf8=✓&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=o&f%5B%5D=fixed_version_id&op%5Bfixed_version_id%5D=%3D&v%5Bfixed_version_id%5D%5B%5D=1&f%5B%5D=&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=subject&c%5B%5D=updated_on&c%5B%5D=category&group_by=)
- Link 2: [link](http://www.redmine.org/projects/redmine/issues?utf8=✓)
Ivestigation¶
http://www.redmine.org/projects/redmine/wiki/Changelog_3_2
Probably some how connected with commit https://github.com/redmine/redmine/commit/c246ffa184a5c773c05dfa568188575aa978f3ed#diff-d730a79b5c2ab74333592401cf7b2396
Becouse /lib/redmine/wiki_formatting/markdown/formatter.rb removing line return nil unless uri_with_safe_scheme?(link) makes links work.
Files
Related issues
Updated by Nikita Remizov over 6 years ago
URI lib replacement can be also a solution https://stackoverflow.com/questions/30923469/ruby-uri-escape-and-uri-encode-and-uri-parse-error
Updated by Nikita Remizov over 6 years ago
One more example of broken link: [Letters](https://yandex.ru/search/?text=кол-во) - so any no latin letter broke link.
Updated by Holger Just over 6 years ago
URIs are defined in RFC 3986 to be allowed to only contain a defined subset of ASCII characters. All other characters must be encoded.
Browsers often perform this automatically. Thus, when you enter the checkmark character in your browser's address bar, it encodes the character to %E2%9C%93
before it is sent to the server. This is the canonical URI representation. Redmine now needs to ensure at various places that some URIs are valid. It does this by attempting to parse the URI according to the rules of RFC 3986. In the case of "special" or cyrillic characters, this fails since these characters are not allowed in a valid URI verbatim.
As a workaround, you need to ensure that URIs are properly encoded when entering them in Redmine. Many browsers, including Chrome and Firefox automatically copy an encoded URL to your clipboard when copying a URL from the address bar which you can use for this purpose.
Updated by Jan from Planio www.plan.io about 5 years ago
- Related to Feature #32424: CommonMark Markdown Text Formatting added
Updated by Marius BĂLTEANU over 3 years ago
- File commonmark.png commonmark.png added
- File markdown.png markdown.png added
- Status changed from New to Closed
- Resolution set to Wont fix
I'm closing this as "Won't fix" because the new CommonMark formatter available in Redmine 5.0.0 (#32424) correctly renders the links. The current Markdown implementation based on RedCarpet is going to be dropped in the future versions. Migrating to the new CommonMark Markdown (Github Flavoured) engine is recommended.
Current Markdown:
CommonMark Markdon: