major
minor
major
minor
The conditions that apply to the content of JavaScript tags are described here: https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
In particular, the following content is not allowed:
<script> const example = 'Consider this string: <!-- <script>'; console.log(example); </script>
However, such a situation can occur if the code editor content is written as a script, since the `>` character is already quoted when writing string literals , but the `<` character is not. If a code editor contains an XML comment followed by a script tag, the sequence shown above is created because the corresponding closing tags are quoted.
Test
Enter the text <!-- Comment --> <script type="text/javascript"></script> into a code editor and ensure that the content is displayed again. This can be done, for example, in the Scripting GUI.