Skip to content

refactor: drop redundant console sanitize#1890

Merged
pedrolamas merged 1 commit into
fluidd-core:developfrom
pedrolamas:pedrolamas/console-remove-redundant-dompurify
Jun 23, 2026
Merged

refactor: drop redundant console sanitize#1890
pedrolamas merged 1 commit into
fluidd-core:developfrom
pedrolamas:pedrolamas/console-remove-redundant-dompurify

Conversation

@pedrolamas

Copy link
Copy Markdown
Member

Console messages are already sanitized at render via v-safe-html (DOMPurify), and ConsoleItem injects further HTML after the store, so the store-side DOMPurify.sanitize never protected the rendered output.

Console messages are already sanitized at render via v-safe-html
(DOMPurify), and ConsoleItem injects further HTML after the store,
so the store-side DOMPurify.sanitize never protected the rendered
output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas added this to the 1.37.2 milestone Jun 23, 2026
@pedrolamas pedrolamas requested a review from Copilot June 23, 2026 21:27
@pedrolamas pedrolamas added the Code - Optimizations Everything that relates to code optimizations! label Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes redundant console-message sanitization from the Vuex console store, relying on the existing v-safe-html (DOMPurify) sanitization at render time in ConsoleItem, which is where additional HTML is injected.

Changes:

  • Drop DOMPurify.sanitize(...) from console/onAddConsoleEntry and console/onGcodeStore.
  • Keep newline-to-<br /> normalization so console formatting remains consistent.

@pedrolamas pedrolamas merged commit 40f9932 into fluidd-core:develop Jun 23, 2026
4 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/console-remove-redundant-dompurify branch June 23, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code - Optimizations Everything that relates to code optimizations!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants