mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-06 06:38:31 +00:00
apply escaping (#4071)
This commit is contained in:
@@ -40,7 +40,8 @@ function Invoke-WPFToggleAllCategories {
|
|||||||
# Update the label to show the correct state
|
# Update the label to show the correct state
|
||||||
$categoryLabel = $categoryContainer.Children[0]
|
$categoryLabel = $categoryContainer.Children[0]
|
||||||
if ($categoryLabel.Content -like "$sourcePrefix*") {
|
if ($categoryLabel.Content -like "$sourcePrefix*") {
|
||||||
$categoryLabel.Content = $categoryLabel.Content -replace "^$sourcePrefix ", "$targetPrefix "
|
$escapedSourcePrefix = [regex]::Escape($sourcePrefix)
|
||||||
|
$categoryLabel.Content = $categoryLabel.Content -replace "^$escapedSourcePrefix ", "$targetPrefix "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user