The previous commit introduced wrong behaviours for <>. The new code carefully escapes what needs to be escaped from LaTeX, using the now-standard XML tools (XMLStream).
In some cases (I only found numbered equations), the LaTeX output still has a bit of HTML. For numbered equations, using \tag{X} (as suggested in https://www.lyx.org/trac/ticket/13048) would require fiddling with the output. KaTeX doesn't support \label. This patch is probably the easiest and most reliable fix.
Fixes https://www.lyx.org/trac/ticket/13048.
Separate xetex-inputenc test sample in working and non-working parts.
Sort HTML-only tests.
Update tagging and ignore-rules.
Change inputencoding to utf8 in dedicated tests (get pdf4_texF working).