function isEntityInAttributeInvalidEnd(code) {
    return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
Checks if the given character is a valid end character for an entity in an attribute.

Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state