Comment #2 on issue 1940 by Spaces in URL path are not encoded as %20 in email notifications

Sorry, the URLs I'm talking about are repository paths for the files changed in a given diff. (I have RB connected to our Subversion repository.) When there are spaces in the path (either for a directory or filename) the email dutifully prints the URL as-is. The trouble starts when I try to click on a link to jump to such a file.

For example, if I submit a review request for a diff affecting this URL: Spaceful Directory Name/

the email that is sent will include this URL in a bulleted list, but without accounting for spaces, the URL is recognized as:

Obviously, this is not a URL that RB is creating per se, but is IS something that can be defended against. One simple approach to fix this is detailed here:

    import urllib
    url = urllib.quote(url, safe="%/:=&?~#+!$,;'@()*[]")

This percent escapes spaces and other characters, but avoid escaping the colon in the scheme, etc. The result is:

Hopefully this provides enough context to clarify the problem I'm seeing. Thanks!

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to