About svgSanitizer

A MODX extra for parsing SVG files inline. The file is cleaned first, to make sure there's no malicious javascripts or external links inside.Uses the following sanitizer: https://github.com/darylldoyle/svg-sanitizer/

For additional information and bug reports, see Github.

Why?Because SVGs are a perfect way for delivering sharp and scalable graphics on your site. And serving them inline makes them even more versatile! You can change the colors of individual paths, let the SVG adapt to its parent's fill color or animate the contents with JS.An added bonus for including SVGs with the svgSanitize snippet, is that you can actually use MODX syntax inside your SVGs. Create multilanguage SVGs by using lexicon strings as text, or use them in getResources templates with unique pagetitles or TV data... Endless possibilities.Have fun!

Information

Released
June 29, 2017

Supported Database
MySQL

License
MIT

Supported Versions
2.3 - Current

Downloads
1,159

Instructions

All you need to do to get started, is place your SVGs in a folder somewhere inside your project and reference the file path in the svgSanitize snippet call:[[svgSanitize?    &file=`assets/img/icons/sanitize-me.svg`    &title=`Add a title here for improved accessibility`]]

For more detailed instructions, please visit Github.

Current releases

1.1.0-pl
View | Download
April 28, 2023
2.3 - Current

1.0.0-pl
View | Download
June 29, 2017
2.3 - Current