Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IVEDU-119] Правки регулярного выражения для поиска ссылок #45

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

whitelacoste
Copy link
Contributor

No description provided.

@whitelacoste whitelacoste requested a review from romanIV02 July 26, 2023 11:54
@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправить регулярку, проверка на пробельные символы после "href" и после "=" причем проверка от 0 до бесконечности, также проверка пробельного символа в самой ссылке, данной регулярке будут соответствовать такие урлы по типу: href = "b i t r i x / ... /"

@whitelacoste whitelacoste merged commit 833f300 into develop Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants