1.0.1 • Published 1 year ago

express-authoparser v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

express-authoparser

The Express.js Middleware that parses query, body, params and removes HTML tags in all string

How's it work

From this:

  {
    "a":"<script>console.log(\"bad code\");</script>",
    "b":"[1,2,3,4,5,6]",
    "c":"{\"a\":\"string property\", \"b\":\"[1,3,4,5, \"true\"]\""
  }

Mades this:

  {
    "a":"console.log('bad code');",
    "b":[1,2,3,4,5,6],
    "c":{
      "a":"string property",
      "b":[1,2,3,4,5, true]
    }
  }

In req.query, req.body (if you use body-parser), req.params

Usage

  let express = require('express');
  let app = express();
  
  let authoparser = require('express-authoparser');
  app.use(authoparser);
1.0.1

1 year ago

1.0.0

1 year ago