docs: public static Map<String, String> extendAttribute(String text, String attribute, String defValue) {
  
          Map<String, String> retValue = new HashMap<String, String>();
          retValue.put("text", text);
          retValue.put("value", "'" + defValue + "'");
          if ((text != null) && (text.toLowerCase().indexOf(attribute.toLowerCase()) >= 0)) {
              // this does not work for things like "att=method()" without quotations.
              String quotation = "\'";
              int pos1 = text.toLowerCase().indexOf(attribute.toLowerCase());
              // looking for the opening quotation mark
              int pos2 = text.indexOf(quotation, pos1);
              int test = text.indexOf("\"", pos1);
              if ((test > -1) && ((pos2 == -1) || (test < pos2))) {
                  quotation = "\"";
                  pos2 = test;
              }
              // assuming there is a closing quotation mark
              int pos3 = text.indexOf(quotation, pos2 + 1);
              // building the new attribute value
              String newValue = quotation + defValue + text.substring(pos2 + 1, pos3 + 1);
              // removing the onload statement from the parameters
              String newText = text.substring(0, pos1);
              if (pos3 < text.length()) {
                  newText += text.substring(pos3 + 1);
              }
              retValue.put("text", newText);
              retValue.put("value", newValue);
          }
          return retValue;
      }