Handle `p` tag stripping in a more robust manner