You can use JavaScript’s encodeURIComponent
:
encodeURIComponent('select * from table where i()')
giving
'select%20*%20from%20table%20where%20i()'
More Related Contents:
- How to assign a domain name to node.js server? [duplicate]
- In Node.js/Express, how do I automatically add this header to every “render” response?
- Writing to files in Node.js
- parseInt vs unary plus, when to use which?
- How to run Gulp tasks sequentially one after the other
- How can I get the destination URL for the onbeforeunload event?
- How to get the anchor from the URL using jQuery?
- Streaming a video file to an html5 video player with Node.js so that the video controls continue to work?
- How to stop babel from transpiling ‘this’ to ‘undefined’ (and inserting “use strict”)
- How to send a message to a particular client with socket.io
- node.js async/await using with MySQL
- ‘await Unexpected identifier’ on Node.js 7.5
- JavaScript require() on client side
- MongoDB select where in array of _id?
- Are arrow functions faster (more performant, lighter) than ordinary standalone function declaration in v8?
- res.download() not working in my case
- Listen on HTTP and HTTPS for a single express app
- Using mongoose promises with async/await
- How can I make this call to request in nodejs synchronous?
- MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
- How to properly add 1 month to current date in moment.js
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- Is it okay to use babel-node in production
- TypeError: Converting circular structure to JSON in nodejs
- Update all clients using Socket.io?
- Websocket API to replace REST API? [closed]
- Connecting to remote SSH server (via Node.js/html5 console)
- Why I got document is not defined error in puppeteer?
- JavaScript EventSource SSE not firing in browser
- Node JS fs module inside browser