sanitize-caja

WebJar for sanitize-caja

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

sanitize-caja
Last Version

Last Version

0.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

sanitize-caja
WebJar for sanitize-caja
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mapbox/sanitize-caja

Download sanitize-caja

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/sanitize-caja/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>sanitize-caja</artifactId>
    <version>0.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/sanitize-caja/
implementation 'org.webjars.npm:sanitize-caja:0.1.3'
// https://jarcasting.com/artifacts/org.webjars.npm/sanitize-caja/
implementation ("org.webjars.npm:sanitize-caja:0.1.3")
'org.webjars.npm:sanitize-caja:jar:0.1.3'
<dependency org="org.webjars.npm" name="sanitize-caja" rev="0.1.3">
  <artifact name="sanitize-caja" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='sanitize-caja', version='0.1.3')
)
libraryDependencies += "org.webjars.npm" % "sanitize-caja" % "0.1.3"
[org.webjars.npm/sanitize-caja "0.1.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Build Status

sanitize-caja

Sanitize HTML content using the Google Caja JsHtmlSanitizer and a set of basic assumptions, and a wrapper to make it all work in nodejs without global variable leaks and so on.

This is a slightly 'loosened' version of Caja's restrictions, to allow for things like images, links, and a few HTML5 elements.

api

sanitize(html: string) -> sanitized string

Sanitize a string of HTML content, returning a sanitized string.

install

npm install @mapbox/sanitize-caja

example

var sanitize = require('@mapbox/sanitize-caja');

document.write(sanitize(evilUserInput));

see also

org.webjars.npm

Mapbox

Mapbox is the location data platform for mobile and web applications. We're changing the way people move around cities and explore our world.

Versions

Version
0.1.3