correctly replacing post content