Filter accepts RegExp and primitive search sequences.

This commit is contained in:
Lars Jung 2012-02-21 01:59:19 +01:00
parent 749a87eaf7
commit 84f543aca5
5 changed files with 42 additions and 22 deletions

View file

@ -100,6 +100,10 @@
return decodeURI(uri);
} catch (err) {}
return uri;
},
reEscape = function (sequence) {
return sequence.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
};
return {
@ -108,7 +112,8 @@
getAbsHref: getAbsHref,
parseSize: parseSize,
formatSize: formatSize,
checkedDecodeUri: checkedDecodeUri
checkedDecodeUri: checkedDecodeUri,
reEscape: reEscape
};
}());