escape-htmlandmongo

1.0.3 • Public • Published

##English version This module escapes mongo injections: $ . , { } [ ] = |

In the other hand, also escapes for prevent xss injections: & " ' > < / `

And converts to ascii code

Installing

npm install escape-htmlandmongo --save

Using

var escape = require('escape-htmlandmongo');

var limpito = escape.esc('$ne: <script>alert(1)</script> hello');

console.log(limpito);

##Castillan version Este módulo escapa inyecciones mongo, de cadenas que comiencen con: $ . , { } [ ] = |

Por otra parte, también escapa caracteres usuales en html, usados para hacer inyecciones xss: & " ' > < / `

Y los convierte, en vez de descartarlos, a notación ascii html.

Installing

npm install escape-htmlandmongo --save

Using

var escape = require('escape-htmlandmongo');

var limpito = escape.esc('$ne: <script>alert(1)</script> hola');

console.log(limpito);

Basado en validator js, mongo-sanitize y express-mongo-sanitize e intento de aunarlos

https://www.npmjs.com/package/escape-htmlandmongo https://github.com/gurumelo/escape-htmlandmongo

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.30latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i escape-htmlandmongo

Weekly Downloads

0

Version

1.0.3

License

GPL-3.0

Last publish

Collaborators

  • gurumelo