Skip to content

Percent-encoding parts of URL leads to a 404 #3884

@Susko3

Description

@Susko3

Bug description

URLs with percent-encoded characters are not resolved properly. They lead to a 404 page even though the canonical page exists.

How to reproduce

  1. Find a working GitBook URL, e.g. https://gitbook.com/docs/getting-started/quickstart
  2. Percent encode one or more characters in the URL path, e.g. https://gitbook.com/docs/getting-started/quickstar%74
  3. Notice that the page gives a 404 "Page not found" error, and that your browser has correctly folded the URL in the address bar to the canonical form (but it still requests the %-encoded form from the server!)

Additional context

Docs: https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding

Although it's strange to percent-encode non-reserved characters, it's still part of the standard. I found it useful for making links to pages with - characters, as they break automatic URL creation in Microsoft Word references, while %2d works as expected on most websites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions