summaryrefslogtreecommitdiff
path: root/tools/wpt/runner.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tools/wpt/runner.ts')
-rw-r--r--tools/wpt/runner.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts
index fb39ddfa4..472449712 100644
--- a/tools/wpt/runner.ts
+++ b/tools/wpt/runner.ts
@@ -186,7 +186,10 @@ async function generateBundle(location: URL): Promise<string> {
if (title) {
const url = new URL(`#${inlineScriptCount}`, location);
inlineScriptCount++;
- scriptContents.push([url.href, `globalThis.META_TITLE="${title}"`]);
+ scriptContents.push([
+ url.href,
+ `globalThis.META_TITLE=${JSON.stringify(title)}`,
+ ]);
}
for (const script of scripts) {
const src = script.getAttribute("src");