I am using site_url()
function and it returns the address as http://vip.local/cc
where I can see that WP automatically adds unnecessary backslashes. Is this for some escaping purpose? I tried using stripslashes
function but that didn’t fix it either. Any help?
Leave a Reply
You must be logged in to post a comment.
You can simply use
stripslashes([string])
.This removes all backslashes (required they need to be) from the given string.
Edit
Code I tested with: PHPaste Snippet.
Edit 2
Code is being used with
json_encode([array])
, automatically adding slashes.