EntityAutocomplete field does not recognize URLs with parentheses after a space, regardless of position

Created on 16 March 2023, over 1 year ago

Problem/Motivation

The EntityAutocomplete field does not recognize URLs that contain parentheses in the file name after a space. When linking to a file for example. Previously, the problem occurred only when the parentheses appeared at the end of the link. However, this issue also appears when the parentheses are used anywhere in the file name, as long as they are after a space.

Steps to reproduce

This issue can be reproduced by adding a link to a file with parentheses after a space in the file name.
For example:
External link - http://www.example.com/files/test (PDF).pdf
Internal link - /sites/default/files/whatever/test (PDF).pdf

Error message: "The path 'entity:node/PDF' is invalid."

Proposed resolution

Changing the regex to only check the parentheses at the end.

Remaining tasks

none

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Needs review

Version

10.1

Component
Entity 

Last updated about 4 hours ago

Created by

🇯🇴Jordan mahseri

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024