update regex for matching URLs, fixes issue #1386
issue #1386

* regex for matching URLs was rewritten
* added unittests
change regex back, issue #1386
(I hope) tests are fixed, issue #1386
wrapper for smart_urlquote, issue #1386
Merge pull request #1397 from amezhenin/issue_1386

update regex for matching URLs, fixes issue #1386