View url with + symbol is redirected to encoded url %2b

Created on 2 April 2024, 11 months ago

Problem/Motivation

By navigating a view path with contextual filters that allow multiple values the user is automatically redirected to the url encoded version

/books/horror+thriller => /books/horror%2bthriller

Steps to reproduce

Please allow me to provide you with a simplified example. you will be able to reproduce the behavior by creating a new view.

- Create a view
- Add a contextual filter and set the option to allow multiple values. This allow to specify multiple ids by separating them using + (E.G. /books/horror+thriller)

- Apply the patch/fix here 🐛 Routematch parameters with multiple values return space instead of + Needs work

Proposed resolution

The issue is due to the php urldecode function. The RouteNormalizerRequestSubscriber::onKernelRequestRedirect cause the redirect even if is not needed.
Replace urldecode with rawurldecode

🐛 Bug report
Status

Active

Version

1.8

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the “VDC” tag instead.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024