Working around a HTML5 entity resolving problem