I want to escape three characters these are
- single quote (')
- double quote (")
- backslash ()
my href value is
test.html?key="test' me'"&event=3
I want to fix it as we do in php by calling addslashes function
<a href="test.html?key="test' me'"&event=3">test</a>
NOTE: I need a dynamic way of doing it
The PHP function to take data and generate a properly encoded query string is
http_build_query. You can then put it in a URL and then encode that usinghtmlspecialcharsto insert it in a document.