From 03e956132d4a4b880d4e4533aeab725b0b2b5b52 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 21 Oct 2023 10:51:24 +0300 Subject: switch to html2text() instead of strip_tags() when preparing FTS index --- classes/article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes/article.php') diff --git a/classes/article.php b/classes/article.php index 2aeb31b99..0b446479b 100755 --- a/classes/article.php +++ b/classes/article.php @@ -90,7 +90,7 @@ class Article extends Handler_Protected { SET tsvector_combined = to_tsvector( :ts_content) WHERE id = :id"); $params = [ - ":ts_content" => mb_substr(strip_tags($content ), 0, 900000), + ":ts_content" => mb_substr(\Soundasleep\Html2Text::convert($content), 0, 900000), ":id" => $ref_id]; $sth->execute($params); } @@ -135,7 +135,7 @@ class Article extends Handler_Protected { SET tsvector_combined = to_tsvector( :ts_content) WHERE id = :id"); $params = [ - ":ts_content" => mb_substr(strip_tags($content ), 0, 900000), + ":ts_content" => mb_substr(\Soundasleep\Html2Text::convert($content), 0, 900000), ":id" => $ref_id]; $sth->execute($params); } -- cgit v1.2.3