Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Maybe a bit weird request :D
From #2815269: Dropdown does not remove HTML when creating options:
- $option.html($link.html());
+ $option.html($link.text().trim());
The issue is that .trim() removes non-breaking spaces as well.
At our project we use non-breaking spaces to display facets in hierarchy. Not sure whether there can be other use cases, but it will do absolutely no harm if we remove .trim(). Browsers will trim leading/ending spaces anyway when displaying text from select options.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2850785-2.patch | 409 bytes | Leksat |
Comments
Comment #2
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #3
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #5
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #6
borisson_Makes sense, thanks!
Comment #8
borisson_