diff --git a/testTaskGate.ps1 b/testTaskGate.ps1
index f816d81..443c976 100644
--- a/testTaskGate.ps1
+++ b/testTaskGate.ps1
@@ -39,7 +39,8 @@ function Install-CyberQP {
}
# Utility for sending plain-text HTTP responses
-function Respond-Text { param($Context, $Text)
+function Respond-Text {
+ param($Context, $Text)
$buffer = [Text.Encoding]::UTF8.GetBytes($Text)
$Context.Response.ContentType = 'text/plain'
$Context.Response.ContentLength64 = $buffer.Length
@@ -50,15 +51,19 @@ function Respond-Text { param($Context, $Text)
#region UI Generation
function Get-UIHtml {
- # Build checkbox HTML
- $checkboxes = $Global:Tasks | ForEach-Object {
- ""
- } -join "`n"
+ # Build checkbox HTML (wrap pipeline in parentheses so -join applies to result array)
+ $checkboxes = (
+ $Global:Tasks | ForEach-Object {
+ ""
+ }
+ ) -join "`n"
# Build JS tasks array
- $tasksJs = $Global:Tasks | ForEach-Object {
- "{ id: '$($_.Id)', handler: '/$($_.Name)' }"
- } -join ",`n "
+ $tasksJs = (
+ $Global:Tasks | ForEach-Object {
+ "{ id: '$($_.Id)', handler: '/$($_.Name)' }"
+ }
+ ) -join ",`n "
$html = @"