Added fix to avoid issue with a closing HTML tag, like </script>, in an emitted js string.