Added string trimming to urlcheck