Skip to content

Datastore javascript display issue when using test "<xxxx>" #476

@DamienCommenge

Description

@DamienCommenge

Hello,

When I'm trying to display test like "xxxx" it's working fine but when it's "" it's not when using Javascript datastore.
If I change Datastore to HTML instead of Javascript, it's working fine.
You can reproduce the issue here :

$HTMLReportPath = "C:\temp\test.html"
$test = "<test>"
Function Get-HTMLReport {
    [CmdletBinding()]

    Param
    (
        #HTML file path
        [Parameter(Mandatory)]
        [System.IO.FileInfo]$Path

    )
    New-HTML {
        New-HTMLTableOption -DataStore JavaScript -BoolAsString -ArrayJoinString '<br>' -ArrayJoin

        New-HTMLHeader {
            New-HTMLSection -Invisible -Margin "5px 5px 5px 5px" {
                New-HTMLSection -Margin "5px 5px 5px 5px" {
                    New-HTMLText -Text "Report generated on $(Get-Date)" -Color Blue
                } -JustifyContent flex-start -Invisible
            }
        }
        New-HTMLTab -Name 'Forest' {
            New-HTMLSection -HeaderText 'Summary' {
                New-HTMLTable -DataTable $test
            }
        }
    } -ShowHTML -FilePath $Path -Encoding UTF8  
}
#Create HTML Report
Get-HTMLReport -Path $HTMLReportPath

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions