Error when using a string with the content "</script>"
Host: Excel online, using Chrome There is a parsing/compiling error somewhere that happens when the user code contains a string with the content "". For example:
// User code $("#run").click(() => tryCatch(run));
async function run() { console.log(""); }
/** Default helper for invoking an action and handling errors. */ async function tryCatch(callback) { try { await callback(); } catch (error) { OfficeHelpers.UI.notify(error); OfficeHelpers.Utilities.log(error); } }
EXPECTED: It console logs ""
ACTUAL:

Good catch, super-interesting. I thought we were escaping the string inside the script, but looks like we're not. I can take this one.
BTW, if you're blocked, I'm pretty sure that if you switch to Script Lab 2017 (see instructions), this should work for you.
Hmmm how could we do this? What if the user wanted to print out "