diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-12 22:51:46 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-12 22:51:46 +1000 |
| commit | 0de0bc6ceb2c56256bf87724572055297dae76af (patch) | |
| tree | 56e44e86247aa5b18a4e82ca38af13c5dcab3c17 /inc/config.php | |
| parent | a7a93ece3d96acb24c589662f49d28675c83c913 (diff) | |
Optional: Allow uploading by URL
Diffstat (limited to 'inc/config.php')
| -rw-r--r-- | inc/config.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/config.php b/inc/config.php index 64fdba92..4858274d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1314,6 +1314,6 @@ // is the absolute maximum, because MySQL cannot handle table names greater than 64 characters. $config['board_regex'] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}'; - // Complex regular expression to catch URLs. - $config['url_regex'] = '/' . '(https?|ftp):\/\/' . '(([\w\-]+\.)+[a-zA-Z]{2,6}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' . '(:\d+)?' . '(\/([\w\-~.#\/?=&;:+%!*\[\]@$\'()+,|\^]+)?)?' . '/'; + // Regex for URLs. + $config['url_regex'] = '@^(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))$@'; |
