docs: function deentitify(s) {
      return s
          .replace(/&#(\d+);?/g, function (_, code) {
              return String.fromCharCode(code);
          })
          .replace(/&#[xX]([A-Fa-f0-9]+);?/g, function (_, hex) {
              return String.fromCharCode( parseInt(hex, 16) );
          })
          .replace(/&(\w+);/g, function (entity, name) {
              return entities[name] || entity;
          });
  }