For the sake of security, some characters in WordPress must be escaped when stored in the database. The characters to be escaped by WordPress are as follows: Single and Double quotation marks:, backslash: that is, when the preceding three characters are saved, "" is automatically added before the characters. The following describes how to retrieve the original data, here we use a simple php function stripslashes ()
For the sake of security, some characters in WordPress must be escaped when stored in the database. The characters to be escaped by WordPress are as follows: Single and Double quotation marks: ', "backslash: \. When the preceding three characters are saved," \ "is automatically added before the characters. let's talk about how to retrieve the original data. Here we use a simple php function stripslashes ()
For the sake of security, some characters in WordPress must be escaped when stored in the database.
The escape characters for WordPress are as follows:
Single or double quotation marks :',"
Backslash :\
That is to say, when the above three characters are saved, "\" is automatically added before the characters. Next we will talk about how to retrieve the original data. Here we will use a simple php function stripslashes ().
Purpose: Delete the stripslashes () function? Addslashes ()? The backslash added to the function.
Syntax: stripslashes (string)
String indicates the string to be searched.
Ps: I have found these three escape characters for WordPress. I should have them. You can add them to me.
Original article address: solves the problem of saving data escape in WordPress. Thank you for sharing it with the original author.