Answer the question
In order to leave comments, you need to log in
WordPress escapes quotes, how to remove them?
WordPress escapes all quotes passed in a GET / POST request. After a little thought, I remembered that there is such a function as magic_quotes_gpc . Checked php.ini, ran the function in the script without connected wordpress, nothing is escaped. It was useful to look at the first thing that caught my eye, I found this in wp-settings.php:
// Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
wp_magic_quotes();
$("body").html("<div class=\"container_main\">body</div>");
Answer the question
In order to leave comments, you need to log in
Knowing where, what and how you can get from _GET, write your filter, for example like this:
Let the input string be like this:
You can first replace the characters you don't like \" with \' , and then run the string through stripslashes_deep(). It should turn out:
Ideally, quotes should be changed to their characters"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question