percent-encoded characters in URLs are double-encoded

Created on 3 August 2011, almost 14 years ago
Updated 20 May 2025, about 4 hours ago

Problem/Motivation

  • Create a redirect from: foo to: sites/default/files/foo%20bar.pdf.
  • When the redirect is followed, it will be double-encoded as sites/default/files/foo%2520bar.pdf, leading to a 404 error.
  • Entering a literal space produces the error "The redirect path sites/default/files/foo bar.pdf is not valid.".

There is a workaround for the To URL: by entering a full http:// URL, and substituting some uppercase letters in the domain name, you can trick the module into thinking it's an external URL, and it will not double-encode the percent characters.

The workaround for the From URL appears to be replace each %20 with a space.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States grendzy

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024