Module Description
Integrates Drupal with the SVG Sanitizer library https://github.com/darylldoyle/svg-sanitizer.

This module registers the SVG Sanitizer with Drupal's library api module. It also makes an SVG Sanitizer field formatter available for image (D7 only), SVG icon (D8 only) and file fields that will attempt to remove non-whitelisted SVG attributes and tags and display the contents of the SVG file.

Features


* Adds a custom "SVG Sanitizer" field formatter that will remove non-whitelisted tags and attributes before rendering the SVG inline.
* Ability to add custom attributes to the list of whitelisted attributes.

Installation steps on Drupal 7:

* Ensure that the Libraries API module is enabled.
* Download the contents of the svg-sanitizer library located at https://github.com/darylldoyle/svg-sanitizer and place it into your libraries directory. Make sure the directory is named svg_sanitizer.
* Enable the svg_sanitizer drupal module.

Demo:

Here is a brief demo, https://www.youtube.com/watch?v=Nb9W9-Ufq0g

Installation steps for Drupal 8

* composer require "drupal/svg_sanitizer"
* enable the module as normal
* configure the sanitizer formatter on the appropriate File or SVG Icon fiels

Project Usage
183
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to integrate Drupal with the SVG Sanitizer library to remove non-whitelisted SVG attributes and tags before rendering the SVG inline.
Data Name
svg_sanitizer

OPENAI CHATBOT

OPENAI CHATBOT

14:37:03
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.