GitHub user jinroh opened a pull request:

    Fix database name escaping

    When having a database with the character `-` in addition with a URI 
escaped character `$ `, `+` or `/`, the name was URI escaped twice and the 
fetch of the database resources could not succeed.
    For instance:
    safeURLName(safeURLName("foo-bar/baz")) // foo-bar%252Fbaz (should be 
    safeURLName(safeURLName("foo-bar+baz")) // foo-bar%252Bbaz (should be 
    This PR makes `utils.safeURLName` indempotent to fix this issue.
    Also the code was testing for the character `,` which is not allowed by 
couch, I removed it form the regex.

You can merge this pull request into a Git repository by running:

    $ git pull 

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #784
commit f608f974eacc0807be6c12cb9e46c7beacddcf71
Author: Pierre Guilleminot <>
Date:   2016-10-12T17:48:42Z

    Fix database id escaping (make safeURLName idempotent)


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to