View Source z_svg (zotonic_stdlib v1.23.1)

Utility functions for svg processing.

Summary

Functions

Sanitize a binary containing a SVG

Sanitize an element from the SVG parse tree. Also called from z_html.erl

Types

svg_element/0

-type svg_element() :: binary() | {binary(), list(), list()} | {comment, binary()}.

Functions

sanitize(Svg)

-spec sanitize(binary()) -> binary().

Sanitize a binary containing a SVG

sanitize_element(Bin)

-spec sanitize_element(svg_element() | term()) -> svg_element().

Sanitize an element from the SVG parse tree. Also called from z_html.erl