Update samy.ps1
This commit is contained in:
10
samy.ps1
10
samy.ps1
@@ -694,13 +694,6 @@ function Get-SamyTasks {
|
||||
if ($t.PSObject.Properties.Name -contains 'Tooltip') { $tooltip = [string]$t.Tooltip }
|
||||
if ([string]::IsNullOrWhiteSpace($tooltip)) { $tooltip = [string]$t.Label }
|
||||
|
||||
# Escape for HTML attribute
|
||||
$tooltip = $tooltip -replace '&','&'
|
||||
$tooltip = $tooltip -replace "'",'''
|
||||
$tooltip = $tooltip -replace '"','"'
|
||||
$tooltip = $tooltip -replace '<','<'
|
||||
$tooltip = $tooltip -replace '>','>'
|
||||
|
||||
if ($t.PSObject.Properties.Name -contains 'Tooltip') {
|
||||
$t.Tooltip = $tooltip
|
||||
} else {
|
||||
@@ -809,8 +802,9 @@ if (-not $Global:SamyTasks) {
|
||||
$subHtml = (
|
||||
$_.SubOptions |
|
||||
ForEach-Object {
|
||||
$subLabel = Escape-HtmlText ([string]$_.Label)
|
||||
"<label style='margin-left:20px; display:block;'>
|
||||
<input type='checkbox' class='sub-option-$taskId' name='$($_.Value)' value='$($_.Value)'> $($_.Label)
|
||||
<input type='checkbox' class='sub-option-$taskId' name='$($_.Value)' value='$($_.Value)'> $subLabel
|
||||
</label>"
|
||||
}
|
||||
) -join "`n"
|
||||
|
||||
Reference in New Issue
Block a user