Skip to content

Commit

Permalink
Merge branch '4.x' of https://github.com/craftcms/cms into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jan 14, 2025
2 parents 38dc728 + 9a859d9 commit 7924127
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Fixed a bug where the control panel could display a notice about the Craft CMS license belonging to a different domain, even when accessing the control panel from the correct domain. ([#16396](https://github.com/craftcms/cms/issues/16396))
- Fixed a bug where Unicode special characters weren’t getting stripped out of search keywords. ([#16430](https://github.com/craftcms/cms/issues/16430))
- Fixed a bug where field layout elements’ action menus could have an empty action group.
- Fixed a bug where Single section entries could be duplicated after running the `entry-types/merge` command. ([#16394](https://github.com/craftcms/cms/issues/16394))
- Fixed a styling bug with the system message modal. ([#16410](https://github.com/craftcms/cms/issues/16410))
Expand Down
4 changes: 4 additions & 0 deletions src/helpers/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static function normalizeKeywords(array|string $str, array $ignore = [],
// Convert non-breaking spaces entities to regular ones
$str = str_replace([' ', ' ', ' '], ' ', $str);

// Get rid of Unicode special characters
// (see https://github.com/craftcms/cms/issues/16430)
$str = preg_replace('/[\x{80}-\x{10FFFF}]/u', '', $str);

// Get rid of entities
$str = preg_replace('/&#?[a-z0-9]{2,8};/i', '', $str);

Expand Down

0 comments on commit 7924127

Please sign in to comment.