html_escape addresses, and improve checks for empty values in form