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

URLs with leading white space cause scanning problems #64

Open
ghost opened this issue Mar 30, 2017 · 0 comments
Open

URLs with leading white space cause scanning problems #64

ghost opened this issue Mar 30, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2017

When a page contains a URL with some leading white space, e.g. <a href=" http://abc.com">, the code assumes that it is a relative link and prepends the URL of the page of the site being scanned, so the URL gets queued as https://mysite.com/ http://abc.com. I fixed this by adding:

// trim white space
        $linkedUrl      = trim($linkedUrl);

at the start of the private function absolutizeUrl($linkedUrl, $currentPageUrl)

This seems to fix the problem, but I can't claim to be really familiar with the code, so I'd welcome any review before being incorporated.

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

No branches or pull requests

0 participants