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 28, 2025
2 parents 2ba90dc + e7ac8ab commit 3cda334
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fixed a bug where native fields (e.g. Title) were showing changed statuses when viewing revisions, if they had been updated since the time the revision was created.
- Fixed a bug where eager-loading element queries could create an excessive amount of cache invalidation tags.
- Fixed a bug where it was possible to enable elements for new sites with validation errors. ([#16505](https://github.com/craftcms/cms/issues/16505))
- Fixed a bug where ʻokina characters weren’t being removed in auto-generated slugs. ([#16548](https://github.com/craftcms/cms/issues/16548))
- Added a `cp.login.alternative-login-methods` hook to the system login template.
- Fixed a bug where Color fields’ custom color inputs were including presets based on the color palette.
- Fixed a bug where nested Matrix entries weren’t getting assigned a post date if they were created while saving the owner element with a custom validation scenario. ([#16504](https://github.com/craftcms/cms/pull/16504))
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/ElementHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static function normalizeSlug(string $slug): string
$slug = StringHelper::stripHtml($slug);

// Remove inner-word punctuation
$slug = preg_replace('/[\'"‘’“”\[\]\(\)\{\}:]/u', '', $slug);
$slug = preg_replace('/[\'"‘’“”ʻ\[\]\(\)\{\}:]/u', '', $slug);

// Make it lowercase
$generalConfig = Craft::$app->getConfig()->getGeneral();
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ public static function toWords(string $str, bool $lower = false, bool $removePun
}

// Remove inner-word punctuation.
$str = preg_replace('/[\'"‘’“”\[\]\(\)\{\}:]/u', '', $str);
$str = preg_replace('/[\'"‘’“”ʻ\[\]\(\)\{\}:]/u', '', $str);

// Split on the words and return
return static::splitOnWords($str);
Expand All @@ -1817,7 +1817,7 @@ public static function toHandle(string $str): string
$handle = static::stripHtml($str);

// Remove inner-word punctuation
$handle = preg_replace('/[\'"‘’“”\[\]\(\)\{\}:]/', '', $handle);
$handle = preg_replace('/[\'"‘’“”ʻ\[\]\(\)\{\}:]/', '', $handle);

// Make it lowercase
$handle = static::toLowerCase($handle);
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/src/js/EnvVarGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Craft.EnvVarGenerator = Craft.BaseInputGenerator.extend({
let name = sourceVal.replace(/<(.*?)>/g, '');

// Remove inner-word punctuation
name = name.replace(/['"\[\]\(\)\{\}:]/g, '');
name = name.replace(/['"ʻ\[\]\(\)\{\}:]/g, '');

// Make it lowercase
name = name.toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/src/js/HandleGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Craft.HandleGenerator = Craft.BaseInputGenerator.extend({
var handle = sourceVal.replace(/<(.*?)>/g, '');

// Remove inner-word punctuation
handle = handle.replace(/['"\[\]\(\)\{\}:]/g, '');
handle = handle.replace(/['"ʻ\[\]\(\)\{\}:]/g, '');

// Make it lowercase
handle = handle.toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/src/js/SlugGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Craft.SlugGenerator = Craft.BaseInputGenerator.extend({
sourceVal = sourceVal.replace(/<(.*?)>/g, '');

// Remove inner-word punctuation
sourceVal = sourceVal.replace(/['"\[\]\(\)\{\}:]/g, '');
sourceVal = sourceVal.replace(/['"ʻ\[\]\(\)\{\}:]/g, '');

if (Craft.limitAutoSlugsToAscii) {
// Convert extended ASCII characters to basic ASCII
Expand Down

0 comments on commit 3cda334

Please sign in to comment.