rem: str += ',' + encodeURI(currOpt.value); 
add: s = opts.stripTags ? currOpt.value.replace(pat, '') : currOpt.value; str += ',' + encodeURIComponent(s); 
context: fleegix.form.serialize = function(docForm, formatOpts) {    var opts = formatOpts || {};  var str = '';  var formElem;  var lastElemName = '';    for (i = 0; i < docForm.elements.length; i++) {    formElem = docForm.elements[i];        switch (formElem.type) {      // Text fields, hidden form elements      case 'text':      case 'hidden':      case 'password':      case 'textarea':      case 'select-one':        str += formElem.name + '=' + encodeURI(formElem.value) + '&'        break;              // Multi-option select      case 'select-multiple':        var isSet = false;        for(var j = 0; j < formElem.options.length; j++) {          var currOpt = formElem.options[j];          if(currOpt.selected) {            if (opts.collapseMulti) {              if (isSet) {                str += ',' + encodeURI(currOpt.value);              }              else {                str += formElem.name + '=' + encodeURI(currOpt.value);                isSet = true;              }            }            else {              str += formElem.name + '=' + encodeURI(currOpt.value) + '&';            }          }        }        if (opts.collapseMulti) {          str += '&';        }        break;            // Radio buttons      case 'radio':        if (formElem.checked) {          str += formElem.name + '=' + encodeURI(formElem.value) + '&'        }        break;              // Checkboxes      case 'checkbox':        if (formElem.checked) {          // Collapse multi-select into comma-separated list          if (opts.collapseMulti && (formElem.name == lastElemName)) {            // Strip of end ampersand if there is one            if (str.lastIndexOf('&') == str.length-1) {              str = str.substr(0, str.length - 1);            }            // Append value as comma-delimited string            str += ',' + encodeURI(formElem.value);          }          else {            str += formElem.name + '=' + encodeURI(formElem.value);          }          str += '&';          lastElemName = formElem.name;        }        break;            }  }  // Remove trailing separator  str = str.substr(0, str.length - 1);  return str;};
meta: 10428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10428/f0576f65a7b0341560eac2493956030db69acdc9/form.js/buggy/src/form.js