Skip to content

Commit e853352

Browse files
committed
fix(Find): Replace single quotes in the 'html' field because they break single-quoted shell strings
1 parent 71cc37a commit e853352

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/actions/find/src/findForUrl.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export async function findForUrl(url: string, authContext?: AuthContext): Promis
1616
findings = rawFindings.violations.map(violation => ({
1717
scannerType: 'axe',
1818
url,
19-
html: violation.nodes[0].html,
20-
problemShort: violation.help.toLowerCase().replace(/[']/g, '’'),
21-
problemUrl: violation.helpUrl.replace(/[']/g, '’'),
19+
html: violation.nodes[0].html.replace(/'/g, "'"),
20+
problemShort: violation.help.toLowerCase().replace(/'/g, "'"),
21+
problemUrl: violation.helpUrl.replace(/'/g, "'"),
2222
ruleId: violation.id,
23-
solutionShort: violation.description.toLowerCase().replace(/[']/g, '’'),
24-
solutionLong: violation.nodes[0].failureSummary?.replace(/[']/g, '’')
23+
solutionShort: violation.description.toLowerCase().replace(/'/g, "'"),
24+
solutionLong: violation.nodes[0].failureSummary?.replace(/'/g, "'")
2525
}));
2626
} catch (e) {
2727
// do something with the error

0 commit comments

Comments
 (0)