Fix exception when new-lines on stripped html was not making some matches work

This commit is contained in:
Bofh 2022-12-17 22:05:44 +01:00
parent 197a4273e8
commit a50f14472f
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ function normalize_word_sound($word, $cback=null) {
function normalize_for_search($str) { function normalize_for_search($str) {
if (trim($str) === '') return ''; if (trim($str) === '') return '';
$str = strip_tags(trim($str)); $str = trim(strip_tags(str_replace('>', '> ', $str)));
$str = strtolower(remove_accents($str)); $str = strtolower(remove_accents($str));
$str = preg_replace('/[^a-z0-9]+/', ' ', $str); $str = preg_replace('/[^a-z0-9]+/', ' ', $str);
$str = preg_replace('/\s+/', ' ', $str); $str = preg_replace('/\s+/', ' ', $str);