How to strip HTML tags, but not all tags? For example i want to have <br>, <b> etc in textareas.
I have this form validation rule:
$this->form_validation->set_rules('user_desc', 'Opis', 'min_length[3]|max_length[200]|xss_clean|strip_tags');
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.
Use
strip_tags()with the second argument.You could build an array of allowable elements and then join them for the second argument with…