aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-09-27 20:47:44 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-09-27 20:47:44 +0000
commit1ac426c97e6b117e9507ad5effbf7ec62590930e (patch)
tree7962285efee869511260e233117d69156f81d56d /h-source/Application/Include
parent8195face3431f385bb61b9e02261f6dfbeb7e916 (diff)
improved the regular expression to find the URLs - lammi87 issue
Diffstat (limited to 'h-source/Application/Include')
-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 0c599f5..2a8ba21 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,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\+\&amp;]+)+)?(#[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\%\+\&amp;]+)+)?(#[a-zA-Z0-9\_\-\+\s\%]+)?([\s]*)?$/';
if (preg_match($match,$url))
{