ancient javascript xml entity converter