fix markup in edit template