]> git.mxchange.org Git - friendica.git/commitdiff
Match all schemes not just acct
authorMatthew Exon <git.mexon@spamgourmet.com>
Mon, 8 Jul 2024 18:04:34 +0000 (20:04 +0200)
committerMatthew Exon <git.mexon@spamgourmet.com>
Mon, 8 Jul 2024 18:04:34 +0000 (20:04 +0200)
src/Module/Xrd.php

index 1e247341a2bfece95dae48e6d0b0807be01ee71f..7a983538a14ffc8a7142174d662617f90f46974e 100644 (file)
@@ -69,7 +69,7 @@ class Xrd extends BaseModule
                if (substr($uri, 0, 4) === 'http') {
                        $name = ltrim(basename($uri), '~');
                        $host = parse_url($uri, PHP_URL_HOST);
-               } else if (substr($uri, 0, 4) === 'acct') {
+               } else if (preg_match('/^[[:alpha:]][[:alnum:]+-.]+:/', $uri)) {
                        $local = str_replace('acct:', '', $uri);
                        if (substr($local, 0, 2) == '//') {
                                $local = substr($local, 2);