File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
browserstack-report-action Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -38235,9 +38235,8 @@ class ReportProcessor {
3823538235 let addToSummaryReport = this.reportData?.report?.basicHtml;
3823638236 if (addToSummaryReport) {
3823738237 addToSummaryReport = `<html>${addToSummaryReport}</html>`;
38238- addToSummaryReport = addToSummaryReport.replace(/[\u201C\u201D]/g, '"');
38239- addToSummaryReport = addToSummaryReport.replace(/"(target="_blank")/g, '" $1');
38240- addToSummaryReport = addToSummaryReport.replace(/</g, '<').replace(/>/g, '>');
38238+ addToSummaryReport = addToSummaryReport.replace(/[\u201C\u201D]/g, '"'); // Replace smart quotes with regular quotes
38239+ addToSummaryReport = addToSummaryReport.replace(/<\/?tbody>/gi, ''); // Remove tbody tags
3824138240 core.info(`Report HTML: ${addToSummaryReport}`);
3824238241 await summary.addRaw(addToSummaryReport, false);
3824338242 } else {
Original file line number Diff line number Diff line change @@ -14,9 +14,8 @@ class ReportProcessor {
1414 let addToSummaryReport = this . reportData ?. report ?. basicHtml ;
1515 if ( addToSummaryReport ) {
1616 addToSummaryReport = `<html>${ addToSummaryReport } </html>` ;
17- addToSummaryReport = addToSummaryReport . replace ( / [ \u201C \u201D ] / g, '"' ) ;
18- addToSummaryReport = addToSummaryReport . replace ( / " ( t a r g e t = " _ b l a n k " ) / g, '" $1' ) ;
19- addToSummaryReport = addToSummaryReport . replace ( / & l t ; / g, '<' ) . replace ( / & g t ; / g, '>' ) ;
17+ addToSummaryReport = addToSummaryReport . replace ( / [ \u201C \u201D ] / g, '"' ) ; // Replace smart quotes with regular quotes
18+ addToSummaryReport = addToSummaryReport . replace ( / < \/ ? t b o d y > / gi, '' ) ; // Remove tbody tags
2019 core . info ( `Report HTML: ${ addToSummaryReport } ` ) ;
2120 await summary . addRaw ( addToSummaryReport , false ) ;
2221 } else {
You can’t perform that action at this time.
0 commit comments