Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sanitizer

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanitizer

Caja's HTML Sanitizer as a Node.js module

  • 0.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
90K
decreased by-6.42%
Maintainers
0
Weekly downloads
 
Created
Source

== Installation

npm install sanitizer

== Require

var sanitizer = require('sanitizer');

== Use

sanitizer.escape('your dirty string'); // Escapes HTML special characters in attribute values as HTML entities

var yourParser = sanitizer.makeSaxParser(yourHandler); // Given a SAX-like event handler, produce a function that feeds those events and a parameter to the event handler.

sanitizer.normalizeRCData('your dirty string'); // Escape entities in RCDATA that can be escaped without changing the meaning.

sanitizer.sanitize('your dirty string'); // Strips unsafe tags and attributes from html.

exports.unescapeEntities('your string'); // The plain text of a chunk of HTML CDATA which possibly containing.

== More information

http://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/plugin/html-sanitizer.js

FAQs

Package last updated on 12 Feb 2012

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc