merge upstream: html5lib