code: function leaveOnlyWhitelistAttribute($html) {
    $html.find('*').each((index, node) => {
      const attrs = node.attributes;
      const blacklist = util.toArray(attrs).filter(attr => {
        const isHTMLAttr = attr.name.match(HTML_ATTR_LIST_RX);
        const isSVGAttr = attr.name.match(SVG_ATTR_LIST_RX);
  
        return !isHTMLAttr && !isSVGAttr;
      });
  
      util.forEachArray(blacklist, attr => {
        // Edge svg attribute name returns uppercase bug. error guard.
        // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5579311/
        if (attrs.getNamedItem(attr.name)) {
          attrs.removeNamedItem(attr.name);
        }
      });
    });
  }
docs: Leave only white list attributes
  @private
  @param {jQuery} $html jQuery instance