Closed jessezhang91 closed 1 year ago
Qwik Runtime
I am setting the dangerouslySetInnerHTML property of a div to a signal's value.
dangerouslySetInnerHTML
div
What I expect is the div to render the raw HTML contained in the signal.
What actually is happening is the string [object Object] is being rendered instead.
[object Object]
https://stackblitz.com/edit/qwik-starter-b5qk8k?file=src%2Froutes%2Findex.tsx
<div dangerouslySetInnerHTML={signal.value} />
System: OS: macOS 13.2.1 CPU: (10) arm64 Apple M1 Pro Memory: 1.42 GB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm Browsers: Chrome: 111.0.5563.64 Firefox Developer Edition: 112.0 Safari: 16.3 npmPackages: @builder.io/qwik: 0.22.1 => 0.22.1 @builder.io/qwik-city: 0.6.3 => 0.6.3 undici: ^5.21.0 => 5.21.0 vite: 4.2.0 => 4.2.0
No response
Start a new pull request in StackBlitz Codeflow.
Which component is affected?
Qwik Runtime
Describe the bug
I am setting the
dangerouslySetInnerHTML
property of adiv
to a signal's value.What I expect is the
div
to render the raw HTML contained in the signal.What actually is happening is the string
[object Object]
is being rendered instead.Reproduction
https://stackblitz.com/edit/qwik-starter-b5qk8k?file=src%2Froutes%2Findex.tsx
Steps to reproduce
<div dangerouslySetInnerHTML={signal.value} />
System Info
Additional Information
No response