From fc7fcdc90ce0a2ff25f76e23e12511080e6acaa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Wr=C3=B3blewski?= Date: Tue, 14 May 2024 11:51:48 +0200 Subject: [PATCH] Rename to isValidBase64 --- src/scriptlets/trusted-replace-outbound-text.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scriptlets/trusted-replace-outbound-text.ts b/src/scriptlets/trusted-replace-outbound-text.ts index c5c6aaa5a..255818d1c 100644 --- a/src/scriptlets/trusted-replace-outbound-text.ts +++ b/src/scriptlets/trusted-replace-outbound-text.ts @@ -153,7 +153,7 @@ export function trustedReplaceOutboundText( * @param str - The string to be checked. * @returns A boolean indicating whether the string is a valid base64 encoded string. */ - const checkIfValidBase64 = (str: string): boolean => { + const isValidBase64 = (str: string): boolean => { try { if (str === '') { return false; @@ -191,7 +191,7 @@ export function trustedReplaceOutboundText( switch (decode) { case 'base64': try { - if (!checkIfValidBase64(content)) { + if (!isValidBase64(content)) { logMessage(source, `Text content is not a valid base64 encoded string: ${content}`); return content; }