i posted some data using tinymce (in a symfony project).while retrieving back how can i remove html tags? strip_tags not working..
i posted some data using tinymce (in a symfony project).while retrieving back how can
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easies way is to use
strip_tagsbut it’s not very reliable. There is a very, very, VERY good project design specifically for this: HTML Purifier.It battle-hardened, tested and very good.
strip_tagsis the easy, fast and go way, but it can miss out some malformated html that a browser will actually parse and execute.Please, don’t use regular expression to parse html!