Add validation to reject invalid characters (?&#) in patterns

Created on 4 March 2016, almost 9 years ago
Updated 22 December 2024, about 1 month ago

Patterns cannot support query strings nor fragments, and there have been several reports filed that could have been prevented if we had extra validation to check for query string and fragment characters.

We should add an additional validation for any characters that are set to be removed or replaced with a separator in the Pathauto settings.

✨ Feature request
Status

Needs review

Version

1.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

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.

  • There is use case for the '#' pound sign.
    As my personal use case goes i have a directory of movie franchises in a glossary view (from views, terms are taxonomy terms) and each "group in the glossary heading" has an anchor which uses the '#' pound sign.
    So the pathauto term URL should for example for ghostbusters read "/cinema/by-franchise/g#ghostbusters" (the g is a field on the term page as a truncated first letter of the term name)

    Even i go to the settings and change the setting for '#' under punctuation to not alter '#' it still says "invalid character for the above URL.

Production build 0.71.5 2024