From 92b0ffe05cd426b85fe2575b8d9a1d39b1410b3c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 23 Mar 2022 11:29:33 +0100 Subject: Fix handling of authors with ampersand & (#4287) Especially needed for HTML+XPath Web scraping as it makes the rest of the pipeline fail to handle special characters. --- app/Models/Entry.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 146acaf35..c3cb337fe 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -271,7 +271,9 @@ class FreshRSS_Entry extends Minz_Model { $this->hash = ''; if (!is_array($value)) { if (strpos($value, ';') !== false) { + $value = htmlspecialchars_decode($value, ENT_QUOTES); $value = preg_split('/\s*[;]\s*/', $value, -1, PREG_SPLIT_NO_EMPTY); + $value = Minz_Helper::htmlspecialchars_utf8($value); } else { $value = preg_split('/\s*[,]\s*/', $value, -1, PREG_SPLIT_NO_EMPTY); } -- cgit v1.2.3