Allow parurl to append to URLs that already have a query-string.
[wrw.git] / wrw / proto.py
index 0e3c798..628bfc9 100644 (file)
@@ -192,7 +192,7 @@ def parstring(pars={}, **augment):
 def parurl(url, pars={}, **augment):
     qs = parstring(pars, **augment)
     if qs != "":
-        return url + "?" + qs
+        return url + ("&" if "?" in url else "?") + qs
     else:
         return url