]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Arguments.php
Add URL decoding to query string in App\Arguments
[friendica.git] / src / App / Arguments.php
index 8047186a0762d3dec2cb89893331e0268a93fad2..bd9f3b553bdf01b9d72b0707becca79d7653857c 100644 (file)
@@ -70,7 +70,7 @@ class Arguments
 
        /**
         * Returns the value of a argv key
-        * @todo there are a lot of $a->argv usages in combination with defaults() which can be replaced with this method
+        * @todo there are a lot of $a->argv usages in combination with ?? which can be replaced with this method
         *
         * @param int   $position the position of the argument
         * @param mixed $default  the default value if not found
@@ -105,9 +105,9 @@ class Arguments
                $queryString = '';
 
                if (!empty($server['QUERY_STRING']) && strpos($server['QUERY_STRING'], 'pagename=') === 0) {
-                       $queryString = substr($server['QUERY_STRING'], 9);
+                       $queryString = urldecode(substr($server['QUERY_STRING'], 9));
                } elseif (!empty($server['QUERY_STRING']) && strpos($server['QUERY_STRING'], 'q=') === 0) {
-                       $queryString = substr($server['QUERY_STRING'], 2);
+                       $queryString = urldecode(substr($server['QUERY_STRING'], 2));
                }
 
                // eventually strip ZRL