Escaping html content for doc generation