Refactoring Post HTML edit