]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Ensure that shortened URLs haven't accumulated whitespace when fetched by a plugin...
authorBrion Vibber <brion@pobox.com>
Thu, 25 Feb 2010 18:30:37 +0000 (10:30 -0800)
committerBrion Vibber <brion@pobox.com>
Thu, 25 Feb 2010 18:30:37 +0000 (10:30 -0800)
lib/util.php

index 9354431f27b62f4214556afbad5c0e51ce0c23e4..9c50d9931fa258471f9b72c7940fdef2ee044ca4 100644 (file)
@@ -1606,6 +1606,7 @@ function common_database_tablename($tablename)
  */
 function common_shorten_url($long_url)
 {
+    $long_url = trim($long_url);
     $user = common_current_user();
     if (empty($user)) {
         // common current user does not find a user when called from the XMPP daemon
@@ -1620,7 +1621,7 @@ function common_shorten_url($long_url)
         return $long_url;
     }else{
         //URL was shortened, so return the result
-        return $shortenedUrl;
+        return trim($shortenedUrl);
     }
 }