changeset 1014:dfced7992460

pages: ignore empty or unset arguments in getURL
author Goffi <goffi@goffi.org>
date Fri, 19 Jan 2018 18:01:01 +0100
parents 841a595bee5a
children 16d52917666c
files src/server/pages.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/server/pages.py	Fri Jan 19 18:00:04 2018 +0100
+++ b/src/server/pages.py	Fri Jan 19 18:01:01 2018 +0100
@@ -351,8 +351,9 @@
         """retrieve URL of the page set arguments
 
         *args(list[unicode]): argument to add to the URL as path elements
+            empty or None arguments will be ignored
         """
-        url_args = [quote(a) for a in args]
+        url_args = [quote(a) for a in args if a]
 
         if self.name is not None and self.name in self.pages_redirects:
             # we check for redirection