Skip to content

Commit

Permalink
Merge pull request #4299 from NikCharlebois/SCDLPComplianceRule
Browse files Browse the repository at this point in the history
SCDLPComplianceRule Fancy Quotes Handling
  • Loading branch information
NikCharlebois authored Feb 7, 2024
2 parents bc6319b + bb0a498 commit 3d90887
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* IntuneDeviceEnrollmentPlatformRestriction
* Added Priority parameter
FIXES [#4081](https://github.com/microsoft/Microsoft365DSC/issues/4081)
* SCDLPComplianceRule
* Properly escapes fancy quotes in the Get method.
* TeamsMeetingPolicy
* Ignore the AllowUserToJoinExternalMeeting parameterfor drift evaluation
since it doesn't do anything based on official documentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function Get-TargetResource
$ExceptIfContentExtensionMatchesWords = $PolicyRule.ExceptIfContentExtensionMatchesWords.Replace(' ', '').Split(',')
}

$fancyDoubleQuotes = "[\u201C\u201D]"
$result = @{
Ensure = 'Present'
Name = $PolicyRule.Name
Expand All @@ -262,8 +263,8 @@ function Get-TargetResource
GenerateIncidentReport = $PolicyRule.GenerateIncidentReport
IncidentReportContent = $ArrayIncidentReportContent
NotifyAllowOverride = $NotifyAllowOverrideValue
NotifyEmailCustomText = $PolicyRule.NotifyEmailCustomText
NotifyPolicyTipCustomText = $PolicyRule.NotifyPolicyTipCustomText
NotifyEmailCustomText = [regex]::Replace($PolicyRule.NotifyEmailCustomText, $fancyDoubleQuotes, '"')
NotifyPolicyTipCustomText = [regex]::Replace($PolicyRule.NotifyPolicyTipCustomText, $fancyDoubleQuotes, '"')
NotifyUser = $PolicyRule.NotifyUser
ReportSeverityLevel = $PolicyRule.ReportSeverityLevel
RuleErrorAction = $PolicyRule.RuleErrorAction
Expand Down

0 comments on commit 3d90887

Please sign in to comment.