]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Ticket #2273: Fix bookmarklet with URls with special characters
[quix0rs-gnu-social.git] / lib / util.php
index 44ccc0deff546d7c15d107010911fbe706789e37..795997868305ff09b2ada3614cf7a9a8d1089cf3 100644 (file)
@@ -1493,7 +1493,15 @@ function common_copy_args($from)
     $to = array();
     $strip = get_magic_quotes_gpc();
     foreach ($from as $k => $v) {
-        $to[$k] = ($strip) ? stripslashes($v) : $v;
+        if($strip) {
+            if(is_array($v)) {
+                $to[$k] = common_copy_args($v);
+            } else {
+                $to[$k] = stripslashes($v);
+            }
+        } else {
+            $to[$k] = $v;
+        }
     }
     return $to;
 }
@@ -1521,7 +1529,8 @@ function common_user_uri(&$user)
 function common_notice_uri(&$notice)
 {
     return common_local_url('shownotice',
-                            array('notice' => $notice->id));
+                            array('notice' => $notice->id),
+                            null, null, false);
 }
 
 // 36 alphanums - lookalikes (0, O, 1, I) = 32 chars = 5 bits