Security
A rich text editor processes HTML from users, from the clipboard and from your database. NovaProse is designed to be safe by default.
What the editor does
Section titled “What the editor does”- 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 allowhttp:,https:, relative URLs and base64 rasterdata:URLs.javascript:,vbscript:anddata:text/htmlare 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
styleattribute. - Inert parsing. HTML is parsed in an inert
<template>, so images don’t load and scripts don’t run while content is processed. - No
innerHTMLwith 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.
What you still need to do
Section titled “What you still need to do”- 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()ornew Function(), so it works with a CSP that forbidsunsafe-eval. Formatting such as colors and alignment is stored instyleattributes, sostyle-srcmust allow inline style attributes ('unsafe-inline'orstyle-src-attr 'unsafe-inline'). - Isolate uploads. See Images.
Reporting a vulnerability
Section titled “Reporting a vulnerability”Email security@novaprose.com. Please do not open a public issue. We acknowledge reports within 3 business days.