With riot.js 2.3.12 (compiling in browser) from:
Compiling the following tag throws an error:
var stringWithTags = "<script> </script>";
Compiling the following works but <!-- should not be removed --> is removed:
<!-- should not be removed -->
alert("The following: <!-- should not be removed -->");
@rubenmch this is a bug, will be fixed soon, thanks.
@rubenmch , I will test, but one "best practice" from the old-school should be an workaround:
var stringWithTags = "<script> <\/script>";
alert("The following: <" + "!-- should not be removed -->");
@aMarCruz Thanks for checking this bug, I used something similar as a workaround, I replaced the character < with its unicode espace sequence \u003C
Closes riot/riot#1448 (partial fix)
You need to write for closing script tags within quoted strings.
Revised regex that matches tags.