Strip whitespace from the validateURL function. Closes #2012