Project

General

Profile

Actions

Feature #1514

closed

Parsing ftp URL

Added by Stanislav German-Evtushenko almost 16 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
Start date:
2008-06-22
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Patch Redmine 0.7.1 for Parsing ftp URLs

Index: lib/redmine/wiki_formatting.rb
===================================================================
--- lib/redmine/wiki_formatting.rb    (revision 1496)
+++ lib/redmine/wiki_formatting.rb    (working copy)
@@ -126,6 +126,7 @@
                         )
                         (
                           (?:https?://)|           # protocol spec, or
+                          (?:ftp://)|              # 
                           (?:www\.)                # www.*
                         )
                         (
Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

  • Category set to Wiki
  • Status changed from New to Closed
  • Target version set to 0.8
  • Resolution set to Fixed

Applied in r1577.

Actions #2

Updated by Kevin Light over 15 years ago

  • Status changed from Closed to Reopened

I think the regex for parsing ftp:// links is a bit too aggressive as it tears apart sftp:// links.

The less aggressive approach would be to watch for whitespace before the ftp:// so the patch should be:

Index: lib/redmine/wiki_formatting.rb
===================================================================
--- lib/redmine/wiki_formatting.rb    (revision 1496)
+++ lib/redmine/wiki_formatting.rb    (working copy)
@@ -126,6 +126,7 @@
                         )
                         (
                           (?:https?://)|           # protocol spec, or
+                          (?:\sftp://)|            # 
                           (?:www\.)                # www.*
                         )
                         (

Actions #3

Updated by Stanislav German-Evtushenko over 15 years ago

Kevin Light wrote:

I think the regex for parsing ftp:// links is a bit too aggressive as it tears apart sftp:// links.

The less aggressive approach would be to watch for whitespace before the ftp:// so the patch should be:

[...]

You can use "inline code" to disable parsing. For example: sftp://myserv

Actions #4

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Reopened to Closed

sftp and ftps proto are now properly turned into links (r2018).

Actions

Also available in: Atom PDF