- Issue created by @fdelgadobdb
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Ah this was a recent symfony security update
We can update the widget to trim the value, but I would argue the trim should happen in LinkItem in coreMoving this the core queue
I have an entity with a "Link" field. This field is shown in a form with "Link (with attributes)" widget. If I try to create a new entity, or update an existing one, and in this field I add a space at the end, it is not trimmed, and an exception is thrown (BadRequestHttpException: Invalid URI: A URI must not start nor end with ASCII control characters or spaces. in Symfony\Component\HttpKernel\HttpKernel->handle() (line 83 of /vendor/symfony/http-kernel/HttpKernel.php).
It is seemed to be related to this update: https://www.drupal.org/project/drupal/issues/3486195 🐛 An update to symfony/http-foundation plus a trailing space took down the views UI Active
- Add a "Link" field to a type of entity
- Go to "Manage form display"
- Set widget to "Link (with attributes)"
- Create or update an entity of the previous type
- Go to link field and write a URL, and add a space at the end of the string
- Submit the form
Active
2.1
Code
Ah this was a recent symfony security update
We can update the widget to trim the value, but I would argue the trim should happen in LinkItem in core
Moving this the core queue