]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
Fix commenting on public posts
[friendica.git] / mod / follow.php
index d7b01e6192f00b1473abade23bb244a26e5b68f2..09201bed16cab63f3a143da391c8a85a154b3205 100644 (file)
@@ -60,8 +60,7 @@ function follow_content(App $a)
 
        $uid = local_user();
 
-       // Issue 4815: Silently removing a prefixing @
-       $url = ltrim(Strings::escapeTags(trim($_REQUEST['url'] ?? '')), '@!');
+       $url = Probe::cleanURI(trim($_REQUEST['url'] ?? ''));
 
        // Issue 6874: Allow remote following from Peertube
        if (strpos($url, 'acct:') === 0) {
@@ -175,7 +174,7 @@ function follow_process(App $a, string $url)
 {
        $return_path = 'follow?url=' . urlencode($url);
 
-       $result = Contact::createFromProbeForUser($a->getUserId(), $url);
+       $result = Contact::createFromProbeForUser($a->getLoggedInUserId(), $url);
 
        if ($result['success'] == false) {
                // Possibly it is a remote item and not an account