By default, all documents rendered by unified-doc
are safely-sanitized after all plugins are applied. This, however, means that you may need to customize sanitzation schema for your specific needs if the default is too restrictive. When using with marks
and plugins, you may need to define custom sanitzation schemas to whitelist stylistic features of various plugins.
The default sanitization schema ensures that the doc is safely-sanitized.
some HTML content
Setting the sanitizeSchema
value to null
skips sanitization of the document. This is a convenient setting to render documents 'as-is'. However, use this only if you have sufficient trust with your source code and user generated content.
Improper use of santization can open you up to a cross-site scripting (XSS) attack. The defaults are safe, but deviating from them is likely unsafe.
some HTML content
The following schema is conveniently used in most scenarios by unified-doc
. This schema whitelists the following stylistic and attributes.
some HTML content