Skip to content

Commit f44ed7f

Browse files
committed
adding sanitisation
1 parent 28bc084 commit f44ed7f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

browserstack-report-action/dist/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38236,6 +38236,7 @@ class ReportProcessor {
3823638236
if (addToSummaryReport) {
3823738237
addToSummaryReport = `<html>${addToSummaryReport}</html>`;
3823838238
addToSummaryReport = addToSummaryReport.replace(/[\u201C\u201D]/g, '"');
38239+
addToSummaryReport = addToSummaryReport.replace(/"(target="_blank")/g, '" $1');
3823938240
core.info(`Report HTML: ${addToSummaryReport}`);
3824038241
await summary.addRaw(addToSummaryReport, false);
3824138242
} else {

browserstack-report-action/src/services/ReportProcessor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class ReportProcessor {
1414
let addToSummaryReport = this.reportData?.report?.basicHtml;
1515
if (addToSummaryReport) {
1616
addToSummaryReport = `<html>${addToSummaryReport}</html>`;
17-
//remove curly quotes with normal double quotes
1817
addToSummaryReport = addToSummaryReport.replace(/[\u201C\u201D]/g, '"');
18+
addToSummaryReport = addToSummaryReport.replace(/"(target="_blank")/g, '" $1');
1919
core.info(`Report HTML: ${addToSummaryReport}`);
2020
await summary.addRaw(addToSummaryReport, false);
2121
} else {

0 commit comments

Comments
 (0)