speed up TrivialHtmlParser (cf. issue 2214)