diff --git a/package-lock.json b/package-lock.json index 286c79db3..9a6ba2e09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "com.foxdebug.acode", - "version": "1.11.3", + "version": "1.11.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "com.foxdebug.acode", - "version": "1.11.3", + "version": "1.11.4", "license": "MIT", "dependencies": { "@deadlyjack/ajax": "^1.2.6", @@ -47,7 +47,7 @@ "autoprefixer": "^10.4.19", "babel-loader": "^9.1.3", "com.foxdebug.acode.rk.exec.terminal": "file:src/plugins/terminal", - "cordova-android": "^13.0.0", + "cordova-android": "13.0.0", "cordova-clipboard": "^1.3.0", "cordova-plugin-advanced-http": "^3.3.1", "cordova-plugin-browser": "file:src/plugins/browser", diff --git a/package.json b/package.json index 55f02d6ae..01b0c9261 100644 --- a/package.json +++ b/package.json @@ -119,4 +119,4 @@ "yargs": "^17.7.2" }, "browserslist": "cover 100%,not android < 5" -} +} \ No newline at end of file diff --git a/src/lib/console.js b/src/lib/console.js index 4367463b4..3fa26dba7 100644 --- a/src/lib/console.js +++ b/src/lib/console.js @@ -468,7 +468,7 @@ import loadPolyFill from "utils/polyfill"; ); break; default: - $msg.innerHTML = arg; + $msg.textContent = arg; break; } } @@ -494,7 +494,7 @@ import loadPolyFill from "utils/polyfill"; * @returns */ function format(args) { - if (args.length <= 1) return [escapeHTML(args[0])]; + if (args.length <= 1) return [args[0]]; const originalArgs = [].concat(args); const styles = []; @@ -548,7 +548,10 @@ import loadPolyFill from "utils/polyfill"; break; } } - msg = msg.substring(0, pos) + escapeHTML(value) + msg.substring(pos + 2); + // Only escape HTML for the %o/%O case where we're injecting actual HTML + const escapedValue = + specifier === "%o" || specifier === "%O" ? value : escapeHTML(value); + msg = msg.substring(0, pos) + escapedValue + msg.substring(pos + 2); matched = matchRegex(msg); }