Socket
Socket
Sign inDemoInstall

escape-htmlandmongo

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

escape-htmlandmongo

Escape html and mongo special characters


Version published
Maintainers
1
Weekly downloads
1

Weekly downloads

Readme

Source

##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

Keywords

FAQs

Last updated on 20 Mar 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc