fix: update characters escaped by safe output (#1815)
This commit is contained in:
parent
7aaf10d9ee
commit
716b1e1304
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
@ -2829,7 +2829,7 @@ const setOutput = ({ key, value, writeOutputFiles, outputDir, json = false, shou
|
|||||||
}
|
}
|
||||||
// if safeOutput is true, escape special characters for bash shell
|
// if safeOutput is true, escape special characters for bash shell
|
||||||
if (safeOutput) {
|
if (safeOutput) {
|
||||||
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?"<>|;`$()&!]/g, '\\$&');
|
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?<>|;`$()&!]/g, '\\$&');
|
||||||
}
|
}
|
||||||
core.setOutput(key, cleanedValue);
|
core.setOutput(key, cleanedValue);
|
||||||
if (writeOutputFiles) {
|
if (writeOutputFiles) {
|
||||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -1355,10 +1355,7 @@ export const setOutput = async ({
|
|||||||
|
|
||||||
// if safeOutput is true, escape special characters for bash shell
|
// if safeOutput is true, escape special characters for bash shell
|
||||||
if (safeOutput) {
|
if (safeOutput) {
|
||||||
cleanedValue = cleanedValue.replace(
|
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?<>|;`$()&!]/g, '\\$&')
|
||||||
/[^\x20-\x7E]|[:*?"<>|;`$()&!]/g,
|
|
||||||
'\\$&'
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
core.setOutput(key, cleanedValue)
|
core.setOutput(key, cleanedValue)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user