update HTMLEntitiesDecode - safer checks, comments