Skip to content
mt-v-safe-html
GitHub

mt-v-safe-html

A lightweight, flexible, and robust XSS sanitizer's Vue directive based on DOMPurify.

Features

Lightweight

The bundle size is less than 9kb when gzipped.

Flexible

Supports global configuration and allows for overriding in individual components.

Robust

Provides support for a default string. If the sanitized tag counts does not match the original HTML, you can choose to display the default string or the result from DOMPurify.