]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Workaround for http_build_query() oddities in low-level router parent code when PHP...
authorBrion Vibber <brion@pobox.com>
Fri, 22 Oct 2010 02:10:43 +0000 (19:10 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 22 Oct 2010 02:10:43 +0000 (19:10 -0700)
lib/router.php

index 417206e6bffb291921a1201fe063316af2638a3e..ab8c40668ddb5eca4da2182419933d771f095c0d 100644 (file)
@@ -863,7 +863,16 @@ class Router
         if ($qpos !== false) {
             $url = substr($url, 0, $qpos+1) .
               str_replace('?', '&', substr($url, $qpos+1));
+
+            // @fixme this is a hacky workaround for http_build_query in the
+            // lower-level code and bad configs that set the default separator
+            // to &amp; instead of &. Encoded &s in parameters will not be
+            // affected.
+            $url = substr($url, 0, $qpos+1) .
+              str_replace('&amp;', '&', substr($url, $qpos+1));
+
         }
+
         return $url;
     }
 }