From f1da46622e2d43870f939c46f43518728baecfd3 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Fri, 5 Mar 2021 15:00:15 -0600 Subject: [PATCH] Signed-off-by: jolheiser (#14898) --- web_src/js/features/contextpopup.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web_src/js/features/contextpopup.js b/web_src/js/features/contextpopup.js index a9a0ceee3b..c16820cf1f 100644 --- a/web_src/js/features/contextpopup.js +++ b/web_src/js/features/contextpopup.js @@ -1,3 +1,4 @@ +import {htmlEscape} from 'escape-goat'; import {svg} from '../svg.js'; const {AppSubUrl} = window.config; @@ -31,7 +32,7 @@ function issuePopup(owner, repo, index, $element) { if ((red * 0.299 + green * 0.587 + blue * 0.114) > 125) { color = '#000000'; } - labels += `
${label.name}
`; + labels += `
${htmlEscape(label.name)}
`; } if (labels.length > 0) { labels = `

${labels}

`; @@ -64,9 +65,9 @@ function issuePopup(owner, repo, index, $element) { }, html: `
-

${issue.repository.full_name} on ${createdAt}

-

${svg(octicon)} ${issue.title} #${index}

-

${body}

+

${htmlEscape(issue.repository.full_name)} on ${createdAt}

+

${svg(octicon)} ${htmlEscape(issue.title)} #${index}

+

${htmlEscape(body)}

${labels}
`