mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Updated dependencies and linted
This commit is contained in:
parent
58361e58f8
commit
a61df0832f
17 changed files with 3591 additions and 1651 deletions
|
@ -293,7 +293,7 @@ const Utils = {
|
|||
* Utils.escapeRegex("[example]");
|
||||
*/
|
||||
escapeRegex: function(str) {
|
||||
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
||||
return str.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
|
||||
},
|
||||
|
||||
|
||||
|
@ -592,7 +592,7 @@ const Utils = {
|
|||
i = 0;
|
||||
|
||||
if (removeNonAlphChars) {
|
||||
const re = new RegExp("[^" + alphabet.replace(/[\[\]\\\-^$]/g, "\\$&") + "]", "g");
|
||||
const re = new RegExp("[^" + alphabet.replace(/[[\]\\\-^$]/g, "\\$&") + "]", "g");
|
||||
data = data.replace(re, "");
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ const Utils = {
|
|||
"`": "`"
|
||||
};
|
||||
|
||||
return str.replace(/[&<>"'\/`]/g, function (match) {
|
||||
return str.replace(/[&<>"'/`]/g, function (match) {
|
||||
return HTML_CHARS[match];
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue