Skip to content

Security

A rich text editor processes HTML from users, from the clipboard and from your database. NovaProse is designed to be safe by default.

  • Schema-based parsing. Content is parsed into a document model. Elements, attributes and styles that the model does not know are dropped, including <script>, <iframe>, event handler attributes (onclick, onerror…) and <style>.
  • URL allowlist on input and output. Links allow http:, https:, mailto:, tel: and relative URLs; images allow http:, https:, relative URLs and base64 raster data: URLs. javascript:, vbscript: and data:text/html are refused when parsing and again when serializing, so a document loaded as JSON cannot smuggle them in either.
  • Validated CSS values. Colors, sizes and fonts are checked against strict patterns before they reach the style attribute.
  • Inert parsing. HTML is parsed in an inert <template>, so images don’t load and scripts don’t run while content is processed.
  • No innerHTML with user data in the UI. Dialogs, tooltips and menus are built with DOM APIs.
  • Deterministic output. getHTML() is generated by our own serializer, not by the browser, so the output does not depend on browser quirks.
  • Sanitize on the server. The editor protects users of the editor; it cannot protect your API from someone who sends HTML directly. Sanitize stored HTML with a server-side allowlist (for example DOMPurify on Node.js, Bleach in Python or the HTML Sanitizer in .NET) before rendering it to other users.
  • Use a Content Security Policy. NovaProse never uses eval() or new Function(), so it works with a CSP that forbids unsafe-eval. Formatting such as colors and alignment is stored in style attributes, so style-src must allow inline style attributes ('unsafe-inline' or style-src-attr 'unsafe-inline').
  • Isolate uploads. See Images.

Email security@novaprose.com. Please do not open a public issue. We acknowledge reports within 3 business days.