]> git.mxchange.org Git - friendica.git/blobdiff - include/html2bbcode.php
Issue 3857: There is the possibility of a bad handling of dislikes
[friendica.git] / include / html2bbcode.php
index c86d6581c605a82ba397129c5579f6c5f3a06828..257539b07481d9dc716a778dd2563c2a860afec8 100644 (file)
@@ -324,7 +324,7 @@ function html2bbcode($message, $basepath = '')
        $message = trim($message);
 
        if ($basepath != '') {
-               $message = AddHostname($message, $basepath);
+               $message = addHostname($message, $basepath);
        }
 
        return $message;
@@ -340,6 +340,8 @@ function html2bbcode($message, $basepath = '')
  */
 function addHostnameSub($matches, $basepath) {
        $base = parse_url($basepath);
+       unset($base['query']);
+       unset($base['fragment']);
 
        $link = $matches[0];
        $url = $matches[1];
@@ -374,7 +376,7 @@ function addHostname($body, $basepath) {
        foreach ($matches AS $match) {
                $body = preg_replace_callback($match,
                                                function ($match) use ($basepath) {
-                                                       return AddHostnameSub($match, $basepath);
+                                                       return addHostnameSub($match, $basepath);
                                                }, $body);
        }
        return $body;