From 4468cb4c2906e2ae8887839b5e683cfc01c7b12c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 28 Jul 2005 20:04:47 +0200 Subject: handle all RFC 1738 compliable schemes in external links RFC 1738 states: Scheme names consist of a sequence of characters. The lower case letters "a"--"z", digits, and the characters plus ("+"), period ("."), and hyphen ("-") are allowed. DokuWiki did only recognize alphanumeric characters, this patch adds periods, plus and hyphen. Thanks to "ytrewq1" for pointing that out. darcs-hash:20050728180447-7ad00-dc0d4b8e9309d571715d6c490d1505bb2666c786.gz --- inc/parser/handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/parser') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 4ed87c3de..ded291356 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -411,7 +411,7 @@ class Doku_Handler { array($link[0],$link[1]), $pos ); - }elseif ( preg_match('#^([a-z0-9]+?)://#i',$link[0]) ) { + }elseif ( preg_match('#^([a-z0-9\-\.+]+?)://#i',$link[0]) ) { // external link (accepts all protocols) $this->_addCall( 'externallink', -- cgit v1.2.3