made the confirm dialog only pop up if there's an error in the HTML

otherwise, friendlycode just publishes when told to.