src/parse/utils/html.js/decodeCharacterReferences
export function decodeCharacterReferences ( html ) {
	return html.replace( entityPattern, ( match, entity ) => {
		let code;

		// Handle named entities
		if ( entity[0] !== '#' ) {
			code = htmlEntities[ entity ];
		} else if ( entity[1] === 'x' ) {
			code = parseInt( entity.substring( 2 ), 16 );
		} else {
			code = parseInt( entity.substring( 1 ), 10 );
		}

		if ( !code ) {
			return match;
		}

		return String.fromCodePoint( validateCode( code ) );
	});
}