Found and fixed bug in entities.js where hex encodings were not
processed properly