code: function(elem, className) {
              // the className can potentially come from the search results, so make sure it is valid before
              // attempting to insert it...
  
              // if the className doesn't start with a letter or a '-' followed by a letter, don't insert
              if(!/^[-]?[A-Za-z]/.test(className)) {
                  return;
              }
              // now filter out anything that is not a letter, number, '-', or '_'
              className = className.replace(/[^A-Za-z0-9_-]/g, "");
              if(this.hasSVG) {
                  if(elem.className.baseVal) {
                      elem.className.baseVal += " " + className;
                  }
                  else {
                      elem.className.baseVal = className;
                  }
              }
              else {
                  $(elem).addClass(className);
              }
          }
docs: TODO: this should be migrated to another object, formatting helper maybe?