rem: if (kwdsarray[k].trim() != '') 
add: if (kwdsarray[k].trim() != '') 
context:         function checkBeforeSubmit(ev)        {            if (!ev) var ev = window.event;                        if (ev.ctrlKey && ev.altKey)            {                var mdt = getObj("mdt"); if (!mdt) return false;                                makeWindow('', '<pre>' +                     ('<?xml version="1.0" encoding="UTF-16"?>' +                      '  <!-- From browser, save as Text/Unicode -->\n\n' +                      mdt.value)                        .replace(/&/g, '&amp;').replace(/"/g, '&quot;')                        .replace(/</g, '&lt;').replace(/>/g, '&gt;') +                     '</pre>');                return false;            }                        var kwdsnow = getObj("kwds_string"); if (!kwdsnow) return true;            if (kwdsnow.value == kwdswere) return true;  // unchanged            // note: calling HTML should define var kwdswere!                        var language = kwdsnow.title;                        var mda = getObj("mda");            if (!mda) { alert('? Form does not contain mda'); return false; }                        var kwdsarray = kwdswere.split(',');                        for (var k = 0; k < kwdsarray.length; k++)  // delete old                if (kwdsarray[k].trim() != '')                     mda.value += "\nmetadata/lom/general/keyword[-1]~";                        kwdsarray = kwdsnow.value                .replace(/[!-,:-@\[-\^{-~\s]+/g, ',').split(',');                        for (k = 0; k < kwdsarray.length; k++)            {                var newkw = kwdsarray[k].trim();                if (newkw != '') mda.value +=                     "\nmetadata/lom/general!keyword" +                     "\nmetadata/lom/general/keyword[-1]!string=" + newkw +                     "\nmetadata/lom/general/keyword[-1]/string/@language=" + language;            }                        return true;                }
meta: 7863	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7863/ef415f98303bf4ec3fc92a62c203ddc80cf12536/md_script.js/buggy/main/metadata/md_script.js