mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03:00
fix(gates): json decoding (#3937)
This commit is contained in:
parent
c4fceab7b3
commit
b2c8475b2c
1 changed files with 3 additions and 6 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue