Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/playground/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ export const setupPlayground = (

// Set up the label for the dropdown
const versionButton = document.querySelectorAll("#versions > a").item(0)
versionButton.innerHTML = "v" + sandbox.ts.version + " <span class='caret'/>"
// Adding HTML sanitizer to remove unsafe content.
const striptags = require('striptags');
versionButton.innerHTML = "v" + striptags(sandbox.ts.version) + " <span class='caret'/>"
versionButton.setAttribute("aria-label", `Select version of TypeScript, currently ${sandbox.ts.version}`)

// Add the versions to the dropdown
Expand Down
Loading