You should use `libcloud.utils.urlquote` and `libcloud.utils.urlunquote` which handles this for you.