Array key not working. Oh BTW key comes from spreadsheet import if that matters

So at least it’s less of a mystery— bad user input being allowed where user input really shouldn’t be allowed.

Strip unwanted character from username [#2218447] |

php - Escape special characters and HTML in Drupal - Stack Overflow

PHP: How to strip unwanted characters from a string |

Html::getClass | Html.php | Drupal 9.3.x | Drupal API