Clean HTML, accessibility and SEO
How to clean HTML copied from Google Docs
HTML copied from Google Docs contains a style on almost every fragment of text, a <b id="docs-internal-guid-…"> wrapper around the whole thing, and dir, role and aria-level attributes. Cleaning it means removing that wrapper, turning styled span elements into strong and em, keeping headings, list…