Index: utils/encoding.py
===================================================================
--- utils/encoding.py	(revision 11981)
+++ utils/encoding.py	(working copy)
@@ -136,7 +136,7 @@
     # section 3.1 of RFC 3987.
     if iri is None:
         return iri
-    return urllib.quote(smart_str(iri), safe='/#%[]=:;$&()+,!?*')
+    return urllib.quote(smart_str(iri), safe='/#%[]=:;$&()+,!?*~')
 
 
 # The encoding of the default system locale but falls back to the
