Safari crashes when calling execCommand on formatted html in special case