diff --git a/crawl.php b/crawl.php index 1ec7193..27cb609 100644 --- a/crawl.php +++ b/crawl.php @@ -55,5 +55,5 @@ foreach ($arg as $url) { echo "title: ".$title."\n"; $stmt = $db->prepare('INSERT INTO indexed (title, url, content) VALUES (?, ?, ?)'); - $stmt->execute([htmlspecialchars(htmlspecialchars_decode($title)), htmlspecialchars(htmlspecialchars_decode($url)), htmlspecialchars(htmlspecialchars_decode($document))]); + $stmt->execute([htmlspecialchars(str_replace('—','—',htmlspecialchars_decode($title))), htmlspecialchars(str_replace('—','—',htmlspecialchars_decode($url))), htmlspecialchars(str_replace('—','—',htmlspecialchars_decode($document)))]); }