Skip to content

Percent encode firestore endpoint pathname to handle special characters #39

@jjnistico

Description

@jjnistico

Hello @alexiglesias93, thanks for putting this package together.

Our usage of firestore document ids/subcollections often includes compound ids using character separators. The URL constructor does not encode these characters when creating the firestore endpoint. In one specific use case of mine a # is used as a delimiter, which URL interprets as a hash https://developer.mozilla.org/en-US/docs/Web/API/URL/hash.

an example of a troublesome document might be some_collection/some#document which will end up being fetched as {baseUrl}/some_collection/some.

The generated path string should be percent encoded to handle the usage of special, but valid, characters in document and collection paths.

Candidate PR is here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions