Changeset 439

Show
Ignore:
Timestamp:
2007-06-22 23:43:06 (2 years ago)
Author:
MaierMan
Message:

fix #209, thanks to Mardak.
the regex accepted empty algorithm and furthermore nsIURL.ref does not contain the hash (#) char.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/chrome/content/common/overlayFunctions.js

    r407 r439  
    741741 */ 
    742742function DTA_getLinkPrintHash(url) { 
    743         if (url instanceof Components.interfaces.nsIURL) { 
    744                 url = url.ref; 
    745         } 
    746         else if (url instanceof Components.interfaces.nsIURI) { 
     743        if (url instanceof Components.interfaces.nsIURI) { 
    747744                url = url.spec; 
    748745        } 
     
    751748        } 
    752749         
    753         var lp = url.match(/#!(md5|sha(?:1|256|384|512)|)!([\da-f]+)$/i); 
     750        var lp = url.match(/#!(md5|sha(?:1|256|384|512))!([\da-f]+)$/i); 
    754751        if (lp) { 
    755752                try {