Skip to content

Conversation

@JeremS
Copy link
Collaborator

@JeremS JeremS commented Nov 28, 2025

A recent conversation on the Discord mentioned SSE event injection. The way to mitigate this is to split the text that will make the data part of SSE events on end of lines and prefix each line with "data: ". Currently that line splitting is done in each patch function (patch-elements, patch-elements-seq, patch-signals).

In this PR I centralized this line splitting in the one function every patch function depends on and I changed the use of clojure.string/split-lines with a custom function that makes use of String/.lines.

In short, I centralized the line splitting in one place to make sure its mandatory and I optimized the process a bit (especially for text with a lot of EOL).

Cheers,

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

Successfully merging this pull request may close these issues.

1 participant