improved url validation: prefix or suffix blank string of the url now is trimed.