Allow EntityAutocomplete to skip search and validation for input matching blacklist

Created on 30 June 2016, over 8 years ago
Updated 17 August 2024, 4 months ago

Problem/Motivation

Autocomplete has the option to disable search for certain input using the attribute data-autocomplete-first-character-blacklist on the autocomplete form element. Unfortunately this doesn't stop EntityAutocomplete::validateEntityAutocomplete() to search for strings matching the blacklist or trying to validate these strings.
I stumbled across this while working on #2756247: UX improvement: use autocomplete for entity selection in area handlers โ†’ .

Proposed resolution

EntityAutocomplete::validateEntityAutocomplete() does not search for strings matched by the configured blacklist and does not try to validate these strings.

Remaining tasks

Convert to MR
Do not add new uses of the word 'blacklist', see #2993575: [meta] Remove usage of "blacklist", "whitelist", use better terms instead โ†’
Add tests

User interface changes

None.

API changes

None.

Data model changes

None.

โœจ Feature request
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Entityย  โ†’

Last updated about 17 hours ago

  • Maintained by
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @catch
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland @berdir
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany @hchonov
Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany stborchert

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

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.71.5 2024