From f7a3803382bbf79876388c219b59dea1e7a5f4e2 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 25 Mar 2012 06:17:04 +0000 Subject: improved reg expr to recognize URLs - Ark issue --- h-source/Application/Include/wikiFormatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'h-source/Application') diff --git a/h-source/Application/Include/wikiFormatting.php b/h-source/Application/Include/wikiFormatting.php index 06a734c..0c599f5 100644 --- a/h-source/Application/Include/wikiFormatting.php +++ b/h-source/Application/Include/wikiFormatting.php @@ -133,7 +133,7 @@ class Tabs function checkUrl($url) { - $match = '/^http(s)?\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)*\.([a-z]{2,3})((\/[a-zA-Z0-9\_\.\-\:\+]+)*(\/([a-zA-Z0-9\_\:\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; + $match = '/^http(s)?\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)*\.([a-z]{2,4})((\/[a-zA-Z0-9\_\.\-\:\+]+)*(\/([a-zA-Z0-9\_\:\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; if (preg_match($match,$url)) { -- cgit v1.2.3