summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-03 10:10:01 +0300
committerAndrew Dolgov <[email protected]>2017-12-03 10:10:01 +0300
commit49a888ecce9c7fbbee0156b7845c3b28b3f48c1a (patch)
tree9cdbabbc6a22d1bc17fc82abd5e84c9fd2baf409 /update.php
parent64312bfd7195e0c2af3f8c854025c44ade4af9a4 (diff)
rssutils: forbid question marks in tsvector data, PDO gets confused sometimes even by quoted ?s
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/update.php b/update.php
index 22dded675..3116ab781 100755
--- a/update.php
+++ b/update.php
@@ -367,7 +367,8 @@
while (true) {
while ($line = $sth->fetch()) {
- $tsvector_combined = mb_substr($line['title'] . ' ' . strip_tags(str_replace('<', ' <', $line['content'])),
+ $tsvector_combined = mb_substr($line['title'] . ' ' .
+ preg_replace('/[<\?\:]/', ' ', strip_tags($line['content'])),
0, 1000000);
$usth->execute([$tsvector_combined, $line['id']]);