summaryrefslogtreecommitdiff
path: root/classes/article.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-21 10:51:24 +0300
committerAndrew Dolgov <[email protected]>2023-10-21 10:51:24 +0300
commit03e956132d4a4b880d4e4533aeab725b0b2b5b52 (patch)
treece23379887ece400212767f527afcba8366f018a /classes/article.php
parent2b61052e8709283d89997e351173bcb43a3c2c61 (diff)
switch to html2text() instead of strip_tags() when preparing FTS index
Diffstat (limited to 'classes/article.php')
-rwxr-xr-xclasses/article.php4
1 files changed, 2 insertions, 2 deletions
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);
}