Much more efficient algorithm for &decode
Support numeric entities (&#1234;)