diff --git a/app/Services/Client.php b/app/Services/Client.php index 9b6d382..d3f3061 100644 --- a/app/Services/Client.php +++ b/app/Services/Client.php @@ -1,25 +1,26 @@ ok()) - { + if (!$response->ok()) { throw new \Exception("Error getting the rss feed"); } - return json_decode(json_encode(simplexml_load_string($response->body())), true); + // Decode Html entity before passing the data to xml loader to decode + return json_decode(json_encode(simplexml_load_string(html_entity_decode($response->body()))), true); } -} \ No newline at end of file +}