Skip to content

html reporter doesn't work #5326

@foven

Description

@foven

Sometimes the information returned by await getMachineInfo() looks like the example below.

{
nodeInfo: [
'Node',
'22.14.0',
'~\AppData\Local\fnm_multishells\19200_1763624547202\node.EXE'
],
osInfo: [ 'OS', 'Windows 10 10.0.19045' ],
cpuInfo: [ 'CPU', '(12) x64 12th Gen Intel(R) Core(TM) i5-12500' ],
chromeInfo: [ 'Chrome', '142.0.7444.163', 'N/A' ],
edgeInfo: [ 'Edge', [ 'Chromium (140.0.3485.54)' ], 'N/A' ],
firefoxInfo: undefined,
safariInfo: [ 'Safari', 'N/A' ],
playwrightBrowsers: 'chromium: 136.0.7103.25, firefox: 137.0, webkit: 18.4'
}

And the escapeHtml method will cause an immediate exit when handling data like edgeinfo.

  function escapeHtml(text) {
    output.print(text)
    if (!text) return ''
    const string =  text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;')
    output.print(string)
    return string
  }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions