When WP_HTML_Tag_Processor is available in WordPress core (6.2), we could remove the fallback implementation of dom parsing using DOMDocument and/or regex introduced in this PR #213 to circumvent the lack of that tool when Gutenberg is not installed.