fixed validation for edit function and added no html allowed in inputs

as defined in your comments I also added some security against HTML in create and edit mode