diff options
-rw-r--r-- | lib/Db/Item.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php index fe2cd6ac5..97b3bc1ca 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -126,12 +126,16 @@ class Item extends Entity implements IAPI, \JsonSerializable public function generateSearchIndex(): void { + $categoriesString = !empty($this->getCategories()) + ? implode('', $this->getCategories()) + : ''; + $this->setSearchIndex( mb_strtolower( html_entity_decode(strip_tags($this->getBody())) . html_entity_decode($this->getAuthor()) . html_entity_decode($this->getTitle()) . - html_entity_decode($this->getCategoriesJson()) . + html_entity_decode($categoriesString) . $this->getUrl(), 'UTF-8' ) |