Use Htmlpurifier Filter input can not & escape to &

Source: Internet
Author: User
Use Htmlpurifier Filter input can not & escape to &
Today operation Classmate said backstage title appeared some garbled shape such as & and so on. I looked at it because the project used the Htmlpurifier third-party package, the initial guess is that the package did some escaping ... The search on the internet did not find it, only in its official forum to find someone to discuss the issue:

Want to store native & instead of & read the following answer: basically it is not recommended. So here I add a PHP function to the last display Htmlspecialchars_decode, directly & back to &

Complement Link: HTML character entity (Character entities), Escape string (Escape Sequence)

Use Htmlpurifier Filter input can not & escape to &

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: 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.