Skip to content

Commit

Permalink
Fixed #1627
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Apr 12, 2017
1 parent 1c9b1f4 commit 3c5323e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Craft CMS 3.0 Working Changelog
- Fixed a PHP error that occurred when creating new elements with Matrix fields. ([#1610](https://github.com/craftcms/cms/issues/1610))
- Fixed a bug where it was impossible to upload user photos, site icon and site logo.
- Fixed an issue where Rich Text Field Asset modals would ignore the defined Volume order.
- Fixed a SQL error that occurred when saving an entry with a Rich Text field that contained a 4-byte character (like an emoji), if using MySQL. ([#1627](https://github.com/craftcms/cms/issues/1627))

## 3.0.0-beta.10 - 2017-04-07

Expand Down
14 changes: 14 additions & 0 deletions src/fields/RichText.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,20 @@ public function getStaticHtml($value, ElementInterface $element): string
return '<div class="text">'.($value ?: '&nbsp;').'</div>';
}

/**
* @inheritdoc
*/
public function getSearchKeywords($value, ElementInterface $element): string
{
$keywords = parent::getSearchKeywords($value, $element);

if (Craft::$app->getDb()->getIsMysql()) {
$keywords = StringHelper::encodeMb4($keywords);
}

return $keywords;
}

/**
* @inheritdoc
*/
Expand Down

0 comments on commit 3c5323e

Please sign in to comment.