Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

{check && <div />} throws XSS error #24

Closed
arthurfiorette opened this issue Nov 8, 2023 · 6 comments
Closed

{check && <div />} throws XSS error #24

arthurfiorette opened this issue Nov 8, 2023 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@arthurfiorette
Copy link
Member

{check && <div />} throws XSS error and should not

@arthurfiorette arthurfiorette added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Nov 8, 2023
@arthurfiorette arthurfiorette self-assigned this Nov 8, 2023
@Firerer
Copy link

Firerer commented Nov 16, 2023

my current work around is {check ? <div /> : ""} :(

@arthurfiorette
Copy link
Member Author

{check && (<div />)} also works

@arthurfiorette
Copy link
Member Author

Fixed!

@Firerer
Copy link

Firerer commented Nov 18, 2023

I'm still getting the same error with <div>{true && <div></div>}</div> using the latest version, but { true && <div />; } works fine.

❯ node -v && pnpm -v
v20.5.1
8.5.1

"@kitajs/ts-html-plugin": "^1.3.1", "@kitajs/html": "^3.0.8",

@arthurfiorette
Copy link
Member Author

Conditions like text !== '/' ? && <div /> also does not work

@arthurfiorette
Copy link
Member Author

I think its fixed now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

2 participants