function addAttr(name, value) {
    name = _.trim(name);
    name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
    if (name.length < 1) return;
    var ret = onAttr(name, value || "");
    if (ret) retAttrs.push(ret);
  }
parse input attributes and returns processed attributes

@param {String} html e.g. `href="#" target="_blank"`
@param {Function} onAttr e.g. `function (name, value)`
@return {String}