apache / couchdb-nano

Nano: The official Apache CouchDB library for Node.js
https://www.npmjs.com/package/nano
Apache License 2.0
651 stars 165 forks source link

fix: ensure document names with _local in them get properly url encoded #342

Open jumoel opened 5 months ago

jumoel commented 5 months ago

Overview

Fix a bug where a document whose name included _local somewhere would not get properly URL encoded.

Non-replicating documents need to start with _local and not just contain _local. The regular expression testing for this was missing a parenthesis.

Testing recommendations

This will allow documents that have a name both containing characters that need to be URL encoded as well as _local to be properly inserted.

GitHub issue number

Related Pull Requests

Checklist