Changeset 39 for trunk/plugins


Ignore:
Timestamp:
03/19/05 12:37:37 (15 years ago)
Author:
gogo
Message:

Appying patch #57 also changed other uses of escape() and unescape(). Not sure about changing
charset=UTF-8 as mentioned in #57, because while the characters will be percent-encoded as %xx%xx
they are still UTF-8, so it seems reasonable that the target server would want to be told that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/Linker/linker.js

    r29 r39  
    101101          if(j) 
    102102          { 
    103             inputs[j[1]] = unescape(j[2]); 
     103            inputs[j[1]] = decodeURIComponent(j[2]); 
    104104          } 
    105105        } 
     
    193193      { 
    194194        atr.href = 'mailto:' + values.to + '?'; 
    195         if(values.subject) atr.href += 'subject=' + escape(values.subject); 
    196         if(values.body)    atr.href += (values.subject ? '&' : '') + 'body=' + escape(values.body); 
     195        if(values.subject) atr.href += 'subject=' + encodeURIComponent(values.subject); 
     196        if(values.body)    atr.href += (values.subject ? '&' : '') + 'body=' + encodeURIComponent(values.body); 
    197197      } 
    198198    } 
     
    369369      this.dTree.add(Linker.nxtid++, parent, 
    370370                     files[i].replace(/^.*\//, ''), 
    371                      'javascript:document.getElementsByName(\'' + this.dialog.id.href + '\')[0].value=unescape(\'' + escape(files[i]) + '\');document.getElementsByName(\'' + this.dialog.id.type + '\')[0].click();document.getElementsByName(\'' + this.dialog.id.href + '\')[0].focus();void(0);', 
     371                     'javascript:document.getElementsByName(\'' + this.dialog.id.href + '\')[0].value=decodeURIComponent(\'' + encodeURIComponent(files[i]) + '\');document.getElementsByName(\'' + this.dialog.id.type + '\')[0].click();document.getElementsByName(\'' + this.dialog.id.href + '\')[0].focus();void(0);', 
    372372                     files[i]); 
    373373    } 
Note: See TracChangeset for help on using the changeset viewer.