1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 05:40:24 +02:00

fix(gates): json decoding (#3937)

This commit is contained in:
Dag
2024-01-29 21:51:23 +01:00
committed by GitHub
parent c4fceab7b3
commit b2c8475b2c

View File

@@ -20,12 +20,9 @@ class GatesNotesBridge extends BridgeAbstract
$apiUrl = self::URI . $api_endpoint . http_build_query($params);
$rawContent = getContents($apiUrl);
$cleanedContent = str_replace([
'<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">',
'</string>',
], '', $rawContent);
// $cleanedContent = str_replace('\"', '"', $cleanedContent);
// $cleanedContent = trim($cleanedContent, '"');
$cleanedContent = trim($rawContent, '"');
$cleanedContent = str_replace('\r\n', "\n", $cleanedContent);
$cleanedContent = stripslashes($cleanedContent);
$json = Json::decode($cleanedContent, false);
if (is_string($json)) {