Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the source url contains a trailing space, it is not being stripped. Making it impossible to redirect to the given destination url.
For example, if we add a link like "/some/random/path ", with spaces. The source url should set as "/some/random/path", but the module keeps it as is.
But there's also a scenario which we need to consider here, Which is raised at https://www.drupal.org/project/redirect/issues/2318079 To keep the leading space as is.
Comment | File | Size | Author |
---|---|---|---|
#10 | remove-spaces-from-path-3032976-10.patch | 785 bytes | gcb |
| |||
#4 | remove-spaces-from-path-3032976-2.patch | 795 bytes | miteshmap |
Comments
Comment #2
miteshmappatch for 8.x-1.x
Comment #3
miteshmapComment #4
miteshmapComment #6
RomixuaComment #7
sosevich.v CreditAttribution: sosevich.v at EPAM Systems commentedThis patch applies on my side. Needs review again.
Comment #8
rodman1980 CreditAttribution: rodman1980 at EPAM Systems commentedComment #9
RomixuaComment #10
gcbThe array formatting for the lines before and after this patch were updated to the more concise version. Here's a re-roll that should apply. This issue exists in 1.4 as well, so bumping the version to latest.
Comment #11
sosevich.v CreditAttribution: sosevich.v at EPAM Systems commentedLets have it merged finally!
Comment #12
gcbComment #13
Dinesh18 CreditAttribution: Dinesh18 at Singapore Press Holdings commentedpatch #10 works perfectly fine. +1 to RTBC
Comment #15
BerdirCommitted.
Comment #17
bkosborneI do not think this was a great decision to have leading spaces kept. I outlined my reasoning in #2318079: Leading space is being stripped from "From" path; proposed fix:
I'll open a new issue to ask that this be changed to a normal trim instead of rtrim.