Tutorial on saving WordPress to Data escape

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.