aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include/wikiFormatting.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-02-20 23:59:50 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-02-20 23:59:50 +0000
commit62203c83efc8e1f996a068743a27de62d792259d (patch)
tree1d294a13396a44ca85f02e162127bfb88c41e191 /h-source/Application/Include/wikiFormatting.php
parent3ff11398297c4a3762500ff3effcb49b0c3ddf78 (diff)
improved the regular expression to find URLs
Diffstat (limited to 'h-source/Application/Include/wikiFormatting.php')
-rw-r--r--h-source/Application/Include/wikiFormatting.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/h-source/Application/Include/wikiFormatting.php b/h-source/Application/Include/wikiFormatting.php
index 0bcc932..06a734c 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\-\_]+)*\.(com|net|it|info|org|eu|uk|ca|us|cl)((\/[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\+\&amp;]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/';
+ $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\+\&amp;]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/';
if (preg_match($match,$url))
{