[TASK] Move the unification of the HTML to a separat method.

Also fix the encoding to always be UTF-8 as the encoding detection for
ISO8859-1 has been broken all the time.