Skip to content

Commit

Permalink
Merge pull request #3801 from NikCharlebois/Fixes-Fancy-Quotes
Browse files Browse the repository at this point in the history
Fixes Fancy Quotes in Complex Objects During Export.
  • Loading branch information
NikCharlebois authored Oct 17, 2023
2 parents 73f8a88 + 4113d88 commit 281e932
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* TeamsUserPolicyAssignment
* Initial release.
FIXES [#3777](https://github.com/microsoft/Microsoft365DSC/issues/3777)
* MISC
* Fixes fancy quotes in complex objects for extraction.

# 1.23.1011.1

Expand Down
8 changes: 8 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ function Get-M365DSCDRGComplexTypeToString
{
$currentProperty = $null
}

if ($null -ne $currentProperty)
{
$fancySingleQuotes = "[\u2019\u2018]"
$fancyDoubleQuotes = "[\u201C\u201D]"
$currentProperty = [regex]::Replace($currentProperty, $fancySingleQuotes, "''")
$currentProperty = [regex]::Replace($currentProperty, $fancyDoubleQuotes, '"')
}
return $currentProperty
}

Expand Down

0 comments on commit 281e932

Please sign in to comment.