From d9b6e3020c3aa13ec593a8dc80cfe02455c5dba1 Mon Sep 17 00:00:00 2001 From: Mike Colagrosso Date: Fri, 5 Jul 2024 18:43:56 -0600 Subject: [PATCH] IndexableText improvements Description and LongDescription were adding too many extraneous matches. Maintain how special characters are handled in search currently. --- lib/Ebook.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Ebook.php b/lib/Ebook.php index 83f718af..a02a7f6b 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -572,8 +572,8 @@ class Ebook{ } } - $this->_IndexableText .= ' ' . $this->Description; - $this->_IndexableText .= ' ' . $this->LongDescription; + // Remove diacritics and non-alphanumeric characters + $this->_IndexableText = trim(preg_replace('|[^a-zA-Z0-9 ]|ius', ' ', Formatter::RemoveDiacritics($this->_IndexableText))); } return $this->_IndexableText;