From 34b11fa5af4115f35f4ec059f8ad388f4b41800f Mon Sep 17 00:00:00 2001 From: xfnw Date: Sat, 11 Dec 2021 12:50:41 -0500 Subject: [PATCH] fix mdash not being htmldecoded --- crawl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)))]); }