Skip to main content
","learningResourceType":"Practice problem","educationalLevel":"hard","about":"HTML","teaches":"parsing and tokenization states","url":"https://journeyuncommon.com/quiz/question/a961a9fd-13a2-4a95-8c62-33cc09cbb2a5","inLanguage":"en","isAccessibleForFree":true,"provider":{"@id":"https://journeyuncommon.com/#organization"},"isPartOf":{"@type":"WebSite","@id":"https://journeyuncommon.com/#website","name":"Journey Uncommon","url":"https://journeyuncommon.com"}}
Journey Uncommon Logo
JourneyUncommon
hardHTMLparsing and tokenization statesSingle-choice MCQ

While in "Script data" state, the tokenizer can transition into "script data escaped" and even "script data double escaped" sub-states. What sequence inside a `<script>` body triggers the escaped sub-state, and why does it exist?

<script> var s = "<!-- <script> still inside -->"; </script>