### Summary
When `escapeParameter` is enabled (`escapeParameterHtml` in the Legacy API), Vue I18n sanitizes the translated HTML with `sanitizeTranslatedHtml()`. The sanitizer reads tags in the same way as the HTML tokenizer, but it does not follow how elements open and close. An element that a translation leaves open, or an end tag that closes an element outside the translation, stays in the result.
When the page is rendered on the server (SSR), the rest of the page follows the translation in the same HTML, and the browser parses it as a part of what is still open. An unclosed `<template>` hides the rest of the page, and an unclosed `<select>` takes it in. With `<object><svg>`, `<table><svg>` or `<math><mi><svg>`, the rest of the page is parsed as SVG, and a later inline `<script>` becomes an SVG script, whose character references are decoded before it runs. Text that the page puts in such a script as data, such as `"` in a serialized state, can then end a JavaScript string, and run in the origin of the application.
### Details
`sanitizeTranslatedHtml()` in `packages/shared/src/sanitize.ts` turns a tag, a comment, or an element whose content is text (such as `<textarea>`) into text when it is not closed at the end of the translation (GHSA-9qc3-h48f-7h96). Other elements are kept even when they are not closed, and end tags are kept even when they close no element of the translation.
In the HTML parser, an end tag closes an element only when the element is in scope. `