CodeQL fixes

This commit is contained in:
n1474335 2022-04-14 16:57:46 +01:00
parent f77633cee9
commit f5fe79326a
2 changed files with 3 additions and 3 deletions

View File

@ -723,8 +723,8 @@ class Utils {
} }
if (removeScriptAndStyle) { if (removeScriptAndStyle) {
htmlStr = recursiveRemove(/<script[^>]*>.*?<\/script>/gi, htmlStr); htmlStr = recursiveRemove(/<script[^>]*>.*?<\/script[^>]*>/gi, htmlStr);
htmlStr = recursiveRemove(/<style[^>]*>.*?<\/style>/gi, htmlStr); htmlStr = recursiveRemove(/<style[^>]*>.*?<\/style[^>]*>/gi, htmlStr);
} }
return htmlStr.replace(/<[^>]+>/g, ""); return htmlStr.replace(/<[^>]+>/g, "");
} }

View File

@ -43,9 +43,9 @@ class ToBase45 extends Operation {
* @returns {string} * @returns {string}
*/ */
run(input, args) { run(input, args) {
if (!input) return "";
input = new Uint8Array(input); input = new Uint8Array(input);
const alphabet = Utils.expandAlphRange(args[0]); const alphabet = Utils.expandAlphRange(args[0]);
if (!input) return "";
const res = []; const res = [];