Skip to content

Commit 05ba279

Browse files
twinpilootMartin Peterspim-simons
authored
fix: Do not escape escaped double quotes (#460)
* Add InjectAsBase64 * Add docs * Remove version 1.3.1 and update preview * Remove sidebars * Rename * Fix unit test * seperate test for windows and linux since base64 encoding seems to be different on them * Skip escaped double quotes --------- Co-authored-by: Martin Peters <Martin.Peters@codit.eu> Co-authored-by: Pim Simons <pim.simons@gmail.com>
1 parent 7898932 commit 05ba279

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Arcus.Scripting.ARM/Scripts/Inject-ArmContent.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ function InjectFile {
8585
# Replace tabs with spaces
8686
$newString = $newString -replace "`t", " "
8787

88-
# Replace " with \"
89-
$newString = $newString -replace """", "\"""
88+
# Replace " with \". Not sure why this is done, but changing this might be a breaking change.
89+
# I expect replacing unescaped double quotes is a compatible change.
90+
# $newString = $newString -replace """", "\"""
91+
$newString = $newString -replace '(?<!\\)"', '\"'
9092
}
9193

9294
if ($optionParts.Contains("EscapeJson")) {

0 commit comments

Comments
 (0)