Search code examples
javascripthtmlnode.jsexpressurlencode

Paramater value '<' converted to '&lt;'


I am using ExpressJS with body-parser library.

When I pass a param value 2<5 then it is converted to 2&lt;5

read: async (req, res, next) => {

    try {
        let condition= req.query.condition|| req.body.condition  // condition= 2<5

Solution

  • After reverse engineering in my code, I found that npm library xss creating the problem.