Module: sanitize

Tools for SVG sanitization

License:
  • MIT
Source:

Members

(inner, constant) svgWhiteList_ :PlainObject

This defines which elements and attributes that we support (or at least don't remove)

Type:
Source:

Methods

(static) sanitizeSvg(node) → {void}

Sanitizes the input node and its children. It only keeps what is allowed from our whitelist defined above.

Parameters:
Name Type Description
node Text | Element

The DOM element to be checked (we'll also check its children) or text node to be cleaned up

Source:
Returns:
Type
void