Quote escape in thinkSNS

Source: Internet
Author: User
In thinkSNS, the quotation mark escape issue is mentioned. in ts framework, the quotation marks and backslashes entered will be displayed incorrectly, for example, "Hello ", after the release, \ "Haoye \" is displayed. the day after tomorrow, there is no Slash. it is displayed at the time of display. this is also true for single quotes.
I don't know whether thinksns has problems in earlier versions or what the situation is. thinksns3.1 does not have such problems. I have also compared the code and have not found any substantive differences, may I ask if it is a problem during Template rendering? if so, how can I modify it?
Please enlighten me.


Reply to discussion (solution)

Escape when output?
This is a bug.

It is normal to retrieve the data from the database in the background and render the page after output. it should be a problem with the template rendering method. I have never touched the TS framework before, so I don't know how to change it. if I try to replace or reverse the definition, there will be more or less problems, so it's a bit tangled!

The problem has been solved. it is solved by using stripslashes () and addslashes (). when writing the statement into the database, use the addslashes () method to escape it, read it from the database, and use stripslashes () just reverse.

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.