Skip to content

Commit

Permalink
fix: update characters escaped by safe output (#1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Dec 24, 2023
1 parent 7aaf10d commit 716b1e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1355,10 +1355,7 @@ export const setOutput = async ({

// if safeOutput is true, escape special characters for bash shell
if (safeOutput) {
cleanedValue = cleanedValue.replace(
/[^\x20-\x7E]|[:*?"<>|;`$()&!]/g,
'\\$&'
)
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?<>|;`$()&!]/g, '\\$&')
}

core.setOutput(key, cleanedValue)
Expand Down

0 comments on commit 716b1e1

Please sign in to comment.