Skip to content

Commit f5fe793

Browse files
committed
CodeQL fixes
1 parent f77633c commit f5fe793

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/Utils.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,8 @@ class Utils {
723723
}
724724

725725
if (removeScriptAndStyle) {
726-
htmlStr = recursiveRemove(/<script[^>]*>.*?<\/script>/gi, htmlStr);
727-
htmlStr = recursiveRemove(/<style[^>]*>.*?<\/style>/gi, htmlStr);
726+
htmlStr = recursiveRemove(/<script[^>]*>.*?<\/script[^>]*>/gi, htmlStr);
727+
htmlStr = recursiveRemove(/<style[^>]*>.*?<\/style[^>]*>/gi, htmlStr);
728728
}
729729
return htmlStr.replace(/<[^>]+>/g, "");
730730
}

src/core/operations/ToBase45.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class ToBase45 extends Operation {
4343
* @returns {string}
4444
*/
4545
run(input, args) {
46+
if (!input) return "";
4647
input = new Uint8Array(input);
4748
const alphabet = Utils.expandAlphRange(args[0]);
48-
if (!input) return "";
4949

5050
const res = [];
5151

0 commit comments

Comments
 (0)