]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Xrd.php
Some more API functions moved
[friendica.git] / src / Module / Xrd.php
index 48623bf70d093c8457f58c66f952845fe1e9f9b8..66404f4567d30b06887620af5a7dadbd79168044 100644 (file)
@@ -30,7 +30,6 @@ use Friendica\Model\Photo;
 use Friendica\Model\User;
 use Friendica\Protocol\ActivityNamespace;
 use Friendica\Protocol\Salmon;
-use Friendica\Util\Strings;
 
 /**
  * Prints responses to /.well-known/webfinger  or /xrd requests
@@ -45,7 +44,7 @@ class Xrd extends BaseModule
                                return;
                        }
 
-                       $uri = urldecode(Strings::escapeTags(trim($_GET['uri'])));
+                       $uri = urldecode(trim($_GET['uri']));
                        if (strpos($_SERVER['HTTP_ACCEPT'] ?? '', 'application/jrd+json') !== false)  {
                                $mode = 'json';
                        } else {
@@ -56,7 +55,7 @@ class Xrd extends BaseModule
                                return;
                        }
 
-                       $uri = urldecode(Strings::escapeTags(trim($_GET['resource'])));
+                       $uri = urldecode(trim($_GET['resource']));
                        if (strpos($_SERVER['HTTP_ACCEPT'] ?? '', 'application/xrd+xml') !== false)  {
                                $mode = 'xml';
                        } else {
@@ -196,7 +195,7 @@ class Xrd extends BaseModule
                                [
                                        'rel'  => 'http://webfinger.net/rel/avatar',
                                        'type' => $avatar['type'],
-                                       'href' => User::getAvatarUrlForId($owner['uid']),
+                                       'href' => User::getAvatarUrl($owner),
                                ],
                                [
                                        'rel'  => 'http://joindiaspora.com/seed_location',
@@ -252,7 +251,7 @@ class Xrd extends BaseModule
                        '$hcard_url'   => $baseURL . '/hcard/' . $owner['nickname'],
                        '$atom'        => $owner['poll'],
                        '$poco_url'    => $owner['poco'],
-                       '$photo'       => User::getAvatarUrlForId($owner['uid']),
+                       '$photo'       => User::getAvatarUrl($owner),
                        '$type'        => $avatar['type'],
                        '$salmon'      => $baseURL . '/salmon/' . $owner['nickname'],
                        '$salmen'      => $baseURL . '/salmon/' . $owner['nickname'] . '/mention',