Here we are encoding all [named character references](http://www.w3.org/TR/html5/syntax.html#named-character-references) rather than just doing some limited escaping. I think `ENT_QUOTES` still applies.