Skip to content

URL validator fails is dollar sign '$' is used in the query parameters #306

Description

@damianr13

Bug description

Example url:
https://services.odata.org/OData/OData.svc/Products?$skip=2&$top=2&$orderby=Rating

The URL above is taken from the Open Data Protocol documentation page.

If we try to validate it:

validators.url("https://services.odata.org/OData/OData.svc/Products?$skip=2&$top=2&$orderby=Rating")

We get the following output:

ValidationError(func=url, args={'value': 'https://services.odata.org/OData/OData.svc/Products?$skip=2&$top=2&$orderby=Rating'})

If we remove the dollar signs:

https://services.odata.org/OData/OData.svc/Products?skip=2&top=2&orderby=Rating

The output simply shows:

True

Expected behaviour

Allow dolllar sign in URL query.

validators.url("https://services.odata.org/OData/OData.svc/Products?$skip=2&$top=2&$orderby=Rating")

Should return

True

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue: Works not as designed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions