From 2e6e2467598c8400cf476cb5914b3a8bd1a3601d Mon Sep 17 00:00:00 2001 From: July Date: Sat, 10 Aug 2024 17:11:43 -0400 Subject: [PATCH] [KemonoBridge] attempt to fix malformed tag responses (#4209) --- bridges/KemonoBridge.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bridges/KemonoBridge.php b/bridges/KemonoBridge.php index 53a820dcc33..e333b574687 100644 --- a/bridges/KemonoBridge.php +++ b/bridges/KemonoBridge.php @@ -55,9 +55,10 @@ public function collectData() if (is_array($tags)) { $item['categories'] = $tags; } else { - $tags = preg_replace('/^{"?/', '["', $tags); - $tags = preg_replace('/"?}$/', '"]', $tags); - $item['categories'] = Json::decode($tags); + $tags = preg_replace('/^{/', '', $tags); + $tags = preg_replace('/}$/', '', $tags); + $tags = preg_replace('/"/', '', $tags); + $item['categories'] = explode(',', $tags); } }