Skip to content

Commit

Permalink
Rename to isValidBase64
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWr committed May 14, 2024
1 parent e87edc4 commit fc7fcdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scriptlets/trusted-replace-outbound-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fc7fcdc

Please sign in to comment.