SyntaxFix
Write A Post
Hire A Developer
Questions
You can use JavaScript's encodeURIComponent:
encodeURIComponent
encodeURIComponent('select * from table where i()')
giving
'select%20*%20from%20table%20where%20i()'