$url
Encode a data into accessible string for url.
$url( string )
string [string]
The string will be encoded.
Notes
The replacement of encodeURIComponent(), useful to encode data before submit to server.
Example
HTML code
<button onclick="start_url()">encode data</button>
JavaScript code
function start_url() { var data = "<?><;[email protected]#$%^&*()_+{}|:\"<>?"; alert($url(data)); }