]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
cgiurl: don't append "?" if there are no parameters
[ikiwiki.git] / IkiWiki.pm
index 1d37e7f8eec96551254c3b86d101092b71e8609b..989f3bee7ca47b427f8ba68806db3c80a0117589 100644 (file)
@@ -1044,6 +1044,11 @@ sub cgiurl (@) {
                $cgiurl=$params{cgiurl};
                delete $params{cgiurl};
        }
+
+       unless (%params) {
+               return $cgiurl;
+       }
+
        return $cgiurl."?".
                join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params);
 }