Removed htmlentities, updated Xpath::escape