mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
fix lint again
This commit is contained in:
parent
fa51addfd5
commit
afb9fd8408
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ class URLEncode extends Operation {
|
||||||
encodeAllSpecialChars (str) {
|
encodeAllSpecialChars (str) {
|
||||||
const specialChars = "!#'()*-._~";
|
const specialChars = "!#'()*-._~";
|
||||||
let encoded = "";
|
let encoded = "";
|
||||||
for (let char of str) {
|
for (const char of str) {
|
||||||
if (encodeURIComponent(char) === char && specialChars.includes(char)) {
|
if (encodeURIComponent(char) === char && specialChars.includes(char)) {
|
||||||
encoded += "%" + this.frontPad(char.charCodeAt(0).toString(16).toUpperCase(), 2, "0");
|
encoded += "%" + this.frontPad(char.charCodeAt(0).toString(16).toUpperCase(), 2, "0");
|
||||||
} else {
|
} else {
|
||||||
|
@ -85,7 +85,7 @@ class URLEncode extends Operation {
|
||||||
*/
|
*/
|
||||||
encodeAllChars (str) {
|
encodeAllChars (str) {
|
||||||
let encoded = "";
|
let encoded = "";
|
||||||
for (let char of str) {
|
for (const char of str) {
|
||||||
encoded += "%" + this.frontPad(char.charCodeAt(0).toString(16).toUpperCase(), 2, "0");
|
encoded += "%" + this.frontPad(char.charCodeAt(0).toString(16).toUpperCase(), 2, "0");
|
||||||
}
|
}
|
||||||
return encoded;
|
return encoded;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue