From c4632861249e6f4a3caf183cd66a73736079d3d1 Mon Sep 17 00:00:00 2001 From: liliya Date: Wed, 26 Jul 2023 14:53:20 +0300 Subject: [PATCH 1/2] =?UTF-8?q?[IVEDU-119]=20=D0=9F=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=80=D0=B5=D0=B3=D1=83=D0=BB=D1=8F=D1=80=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=B2=D1=8B=D1=80=D0=B0=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=D1=81=D1=8B=D0=BB=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tests/course2/lesson8/testsettingresultlinks.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tests/course2/lesson8/testsettingresultlinks.php b/lib/tests/course2/lesson8/testsettingresultlinks.php index 8f67f2f9..be83d00c 100644 --- a/lib/tests/course2/lesson8/testsettingresultlinks.php +++ b/lib/tests/course2/lesson8/testsettingresultlinks.php @@ -18,7 +18,7 @@ class TestSettingResultLinks extends BaseTest public static function interceptErrors() { - return true; + return false; } protected static function run() @@ -128,9 +128,9 @@ protected static function getGadgetUrls($formId, &$todayLinkIndex, &$allLinkInde $page = ob_get_contents(); ob_clean(); - preg_match_all('/href="[\w\s\d\=\'"\/_\.\?&;\-\#\$\%\^:]*\>/iu', $page, $matches, PREG_SET_ORDER); + preg_match_all('/href\s*=\s*("|\')[\w\s\d=\/_.?&;\-#]*("|\')/iu', $page, $matches, PREG_SET_ORDER); foreach ($matches as $match) { - $urls[] = mb_strcut($match[0], strpos($match[0], '"') + 1, -2); + $urls[] = mb_strcut(trim($match[0]), 6, -1); } if (strpos($urls[1], 'find_date_create_1')) { From fbf56123cd71a891c65bf560bd4bd8d820328dae Mon Sep 17 00:00:00 2001 From: liliya Date: Mon, 14 Aug 2023 17:48:25 +0300 Subject: [PATCH 2/2] =?UTF-8?q?[IVEDU-119]=20=D0=9F=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=D1=81=D1=8B=D0=BB=D0=BE=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tests/course2/lesson8/testsettingresultlinks.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tests/course2/lesson8/testsettingresultlinks.php b/lib/tests/course2/lesson8/testsettingresultlinks.php index be83d00c..e7f543bb 100644 --- a/lib/tests/course2/lesson8/testsettingresultlinks.php +++ b/lib/tests/course2/lesson8/testsettingresultlinks.php @@ -18,7 +18,7 @@ class TestSettingResultLinks extends BaseTest public static function interceptErrors() { - return false; + return true; } protected static function run() @@ -128,7 +128,8 @@ protected static function getGadgetUrls($formId, &$todayLinkIndex, &$allLinkInde $page = ob_get_contents(); ob_clean(); - preg_match_all('/href\s*=\s*("|\')[\w\s\d=\/_.?&;\-#]*("|\')/iu', $page, $matches, PREG_SET_ORDER); + $page = preg_replace('/\s*/', '', $page); + preg_match_all('/href=("|\')[\w\d=\/_.?&;\-#]*("|\')/iu', $page, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $urls[] = mb_strcut(trim($match[0]), 6, -1); }