convert URL to string, and strip whitespace (blame imgur)