aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-01-24 12:47:31 +0100
committerMikael Nordfeldth <mmn@hethane.se>2016-01-24 12:47:31 +0100
commita9d18a077eca2db07b2f44e17f2a6a1b95d197bd (patch)
treeb56f1e5e0ea74c1bc49cf0526841423ca0f38320 /classes
parent1cec627d7211115871511d134c94bd6786d937c3 (diff)
downloadgnu-social-a9d18a077eca2db07b2f44e17f2a6a1b95d197bd.tar
gnu-social-a9d18a077eca2db07b2f44e17f2a6a1b95d197bd.zip
Harmonize, clarify, categorize URL schemes
Regular expression + avoid-redirection list now match each other.
Diffstat (limited to 'classes')
-rw-r--r--classes/File_redirection.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/File_redirection.php b/classes/File_redirection.php
index 491353a214..a1956f173a 100644
--- a/classes/File_redirection.php
+++ b/classes/File_redirection.php
@@ -312,15 +312,20 @@ class File_redirection extends Managed_DataObject
$out_url = str_replace('.-()', '', $out_url);
break;
+ // non-HTTP schemes, so no redirects
case 'bitcoin':
case 'mailto':
- case 'magnet':
case 'aim':
case 'jabber':
case 'xmpp':
// don't touch anything
break;
+ // URLs without domain name, so no redirects
+ case 'magnet':
+ // don't touch anything
+ break;
+
default:
$out_url = $default_scheme . ltrim($out_url, '/');
$p = parse_url($out_url);