• MODX.com

    1,159 downloads

svgSanitizer

svgSanitizer is an extra by suikerzout, first released on 2023-04-17.

Package Description

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/

Usage/Installation Instructions

# 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/ ## Inline usage 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: ``` ``` ## Create SVG sprite In addition to cleaning your SVG, you can choose to output the result as a symbol, for use in an SVG sprite: ```html ... ``` Will result in something like: ```html Yay, you cared about accessibility ... ... ``` Include this SVG somewhere in your HTML and then reference the symbols in your content like this: ```html ```

Details

Developer(s)
suikerzout
Released
2023-04-28
First seen
2023-04-17
License
MIT
Supported databases
Minimum MODX Requirement
2.3

svgSanitizer Releases

Vendor Signature Released on
MODX.com 1.1.0-pl 2023-04-28 (1 year ago)
MODX.com 1.0.0-pl 2017-06-29 (7 years ago)

We've also seen 1 unverified versions of svgSanitizer in use, but don't list those as we've been unable of confirming they are official releases from an official source.