express-authoparser
v1.0.1
Published
The Express.js Middleware that parses query, body, params and removes HTML tags
Downloads
1
Readme
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);