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

issue_139: check invalid url #140

Merged
merged 1 commit into from
May 28, 2020
Merged

issue_139: check invalid url #140

merged 1 commit into from
May 28, 2020

Conversation

tuanngocnguyen
Copy link

@tuanngocnguyen tuanngocnguyen commented May 28, 2020

Fix for #139

@tuanngocnguyen tuanngocnguyen force-pushed the issue139_invalid_url branch 2 times, most recently from 9ee2d2f to c330723 Compare May 28, 2020 04:27
@tuanngocnguyen
Copy link
Author

Hi @brendanheywood, I have created a patch for invalid url. Would you please have a look once you have some time? Thanks

@@ -286,6 +286,10 @@ public function mark_for_crawl($baseurl, $url, $courseid = null, $priority = TOO

$url = $this->absolute_url($baseurl, $url);

if (filter_var($url, FILTER_VALIDATE_URL) === false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably use the moodle libs instead:

clean_param($url, PARAM_URL);

@tuanngocnguyen tuanngocnguyen force-pushed the issue139_invalid_url branch 2 times, most recently from 3b7e23b to ea1cc68 Compare May 28, 2020 06:10
@brendanheywood brendanheywood merged commit 20c3272 into master May 28, 2020
@brendanheywood brendanheywood deleted the issue139_invalid_url branch May 28, 2020 08:11
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