Skip to content

fix: SRE feedback#234

Merged
abhishek305 merged 1 commit intomainfrom
fix/SRE-feedbacks
Dec 11, 2025
Merged

fix: SRE feedback#234
abhishek305 merged 1 commit intomainfrom
fix/SRE-feedbacks

Conversation

@abhishek305
Copy link
Contributor

🛠️ Changes Made

  1. Added DOMPurify dependency
    Installed dompurify for industry-standard HTML sanitization
  2. New utility functions (src/common/utils/index.ts)
    sanitizeForDisplay(value) - Sanitizes HTML content while preserving line breaks (
    ,
    ) for multiline cell support
    safePopperAttributes(attrs) - Whitelists only safe popper data attributes (data-popper-placement, data-popper-reference-hidden, data-popper-escaped)
  3. Updated cell.tsx
    Cell content now sanitized via sanitizeForDisplay() before rendering in ContentEditable
  4. Updated header.tsx
    Popper attributes now filtered through safePopperAttributes() instead of direct object spreading

Reference:

@abhishek305 abhishek305 requested a review from a team as a code owner December 11, 2025 08:23
@abhishek305 abhishek305 requested a review from a team December 11, 2025 08:23
@abhishek305 abhishek305 merged commit 874d7a9 into main Dec 11, 2025
6 checks passed
@abhishek305 abhishek305 deleted the fix/SRE-feedbacks branch December 11, 2025 08:34
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.

2 participants