Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DamienCommenge opened this issue Feb 25, 2025 · 0 comments
Open

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

DamienCommenge opened this issue Feb 25, 2025 · 0 comments

Comments

@DamienCommenge
Copy link

DamienCommenge commented Feb 25, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant