New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@locker/html-sanitizer

Package Overview
Dependencies
Maintainers
7
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/html-sanitizer

Locker Next HTML and SVG sanitize utility package

0.13.7
npm
Version published
Weekly downloads
2.1K
-21.39%
Maintainers
7
Weekly downloads
 
Created
Source
Description

The html-sanitize package provides a set of utilities meant to facilitate the sanitization of HTML and SVG strings and elements. It is built around DOMPurify.

Features
  • caching mechanism to store DOMPurify instances based on configuration objects. This avoids reparsing the configuration object.
  • utility functions meant to facilitate working with predefined configuration objects required by Locker in various scenarios, i.e sanitization of SVG strings, sanitization of Blob HTML content strings, sanitization of strings that are to be usd with innerHTML, outerHTML etc.
  • hook for sanitizing SVG network resources (even if they are nested).

FAQs

Package last updated on 30 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts