EventEmitter double quotes not removed? #1844
-
Hi, I'm quite new to HTMX and I apologize if I've overlooked something. To familiarize myself with HTMX, I decided to create a GPT chat website. Technologies Used
I've implemented a version of this event emitter for Elysia here. CodeIn my HTML, I have the following snippet: <div id="messages_view" hx-ext="sse" sse-connect="/events">
<div
hx-get="/getMessages"
hx-trigger="load"
sse-swap="message"
hx-swap="beforeend"></div>
</div> I've set up an endpoint But, for some reason, the quotation marks remain around the new divs returned by the server. Sending the HTML directly with the headers works as expected: the HTML is parsed correctly without any quotation marks. But when sent through the event stream, it's treated as a string and not as HTML. Any assistance would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My bad, the Elysia code for SSE |
Beta Was this translation helpful? Give feedback.
My bad, the Elysia code for SSE
JSON.stringify
ed it so now I removed it and it works fine :)