refactor new-post method, html escape