Parse html as whole document to avoid encoding issues
Remove use of mb_convert_encoding to convert html entities,
which is deprecated in php8.2
According to the html spec a html document without encoding is in ascii
and allows non-ascii letters only as html entities, thats why the
conversion from utf-8 to html entities is needed. Avoid this by parsing
a utf8-html document.
Bug: T324170
Change-Id: Ieaca3338d580121603eae0ba058cfb8ac3d56abc