[#7878] quote in py2 should always work on bytes, and it does internal caching so very weird distant code can get errors if safe param is unicode
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 2ded70d..6c35dcb 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -164,14 +164,14 @@
     return patchem
 
 
-def urlquote(url, safe="/"):
+def urlquote(url, safe=b"/"):
     try:
         return urllib.quote(str(url), safe=safe)
     except UnicodeEncodeError:
         return urllib.quote(url.encode('utf-8'), safe=safe)
 
 
-def urlquoteplus(url, safe=""):
+def urlquoteplus(url, safe=b""):
     try:
         return urllib.quote_plus(str(url), safe=safe)
     except UnicodeEncodeError: