mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
expanded unit tests to cover mega links, reverted regex to old one, but fixed to cover mega links, just to prove it works
This commit is contained in:
parent
c468b74b9b
commit
10201dc463
6 changed files with 12 additions and 7 deletions
|
@ -26,6 +26,7 @@ var a2zString = ['a','b','c','d','e','f','g','h','i','j','k','l','m',
|
|||
'n','o','p','q','r','s','t','u','v','w','x','y','z'],
|
||||
alnumString = a2zString.concat(['0','1','2','3','4','5','6','7','8','9']),
|
||||
queryString = alnumString.concat(['+','%','&','.','*','-','_']),
|
||||
hashString = queryString.concat(['!']),
|
||||
base64String = alnumString.concat(['+','/','=']).concat(
|
||||
a2zString.map(function(c) {
|
||||
return c.toUpperCase();
|
||||
|
@ -127,6 +128,11 @@ exports.jscQueryString = function() {
|
|||
return jsc.elements(queryString);
|
||||
};
|
||||
|
||||
// provides random characters allowed in hash queries
|
||||
exports.jscHashString = function() {
|
||||
return jsc.elements(hashString);
|
||||
};
|
||||
|
||||
// provides random characters allowed in base64 encoded strings
|
||||
exports.jscBase64String = function() {
|
||||
return jsc.elements(base64String);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue