From af4777df6945169169df84540309135e309c656e Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 15 Mar 2023 05:35:44 +0100 Subject: [PATCH] try --- lib/Fred.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Fred.class.php b/lib/Fred.class.php index d671405..dab3855 100644 --- a/lib/Fred.class.php +++ b/lib/Fred.class.php @@ -46,7 +46,8 @@ class Fred { throw new Exception("J'ai pas pû récupérer la putain de deuxième page."); } - preg_match("`url='([^']+)'`isU", $page2, $matches); + $ClearText = preg_replace( "/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($page2))) ); + preg_match("`url='([^']+)'`isU", $ClearText, $matches); $ipnsKey = $matches[1]; @@ -148,8 +149,8 @@ class Fred { throw new Exception("J'ai pas pû récupérer la putain de deuxième page."); } - - preg_match("`url='([^']+)'`isU", $page2, $matches); + $ClearText = preg_replace( "/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($page2))) ); + preg_match("`url='([^']+)'`isU", $ClearText, $matches); $gchangeId = $matches[1];