firecat53 / urlscan

Mutt and terminal url selector (similar to urlview)
GNU General Public License v2.0
213 stars 37 forks source link

Input that begins with valid URL starting with http:// are not correctly parsed #36

Closed msmith491 closed 8 years ago

msmith491 commented 8 years ago

Originally found in this thread: https://github.com/firecat53/urlscan/pull/34

Test cases:

Working $ echo -e "\nhttp://www.google.com\nhttp://www.reddit.com" | ./bin/urlscan --no-browser

$ echo -e "tester\nhttp://www.google.com\nhttp://www.reddit.com" | ./bin/urlscan --no-browser

$ echo -e "tester http://www.google.com\nhttp://www.reddit.com" | ./bin/urlscan --no-browser

$ echo -e "www.google.com\nhttp://www.reddit.com" | ./bin/urlscan --no-browser

Not working: $ echo -e "http://www.google.com\nhttp://www.reddit.com" | ./bin/urlscan --no-browser

$ echo -e "https://www.google.com\nhttp://www.reddit.com" | ./bin/urlscan --no-browser

firecat53 commented 8 years ago

Hrm, looks like an artifact of email.Parser. Have to prepend a blank line or word if that first line starts with http*

firecat53 commented 8 years ago

Give the develop branch a try and see if that fixes it for you.

msmith491 commented 8 years ago

That change fixes the issue for me. Thanks!