Skip to content

#730 Page Editing Sanitisation#770

Open
nole2701 wants to merge 2 commits into
mainfrom
page-script-bug
Open

#730 Page Editing Sanitisation#770
nole2701 wants to merge 2 commits into
mainfrom
page-script-bug

Conversation

@nole2701
Copy link
Copy Markdown
Collaborator

  • Used DOMPurify in the front-end, and Ammonia in the back-end to sanitise HTML using the same whitelist settings.
  • Front-end DOMPurify helps to sanitise the preview.
  • Ammonia in the back-end prevents upsert_page.sql from ever saving banned tags/attributes.
  • Keeps track of removed tags/attributes to display an Alert of what components were removed.
  • Users can still save when the warning Alert is there, but non-whitelisted tags/attributes will just be left out from the result. Banned tags/attributes will never show at any point.
image

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for dailp ready!

Name Link
🔨 Latest commit 2231fd6
🔍 Latest deploy log https://app.netlify.com/projects/dailp/deploys/6a0c82d1538eea000872689d
😎 Deploy Preview https://deploy-preview-770--dailp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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