1

I want the basic things such as bold, italic, underline, link, image, list and colors. I am using bbcode editor. I am also using strip_tags in my php, I want to bypass this so it only allows the above and not things such as mysql queries, javascript tags, header tags.

0

2 Answers 2

1

If i were you, i would probably do some str_replace before strip_tags so any <Tag As well as </tag becomes [[{{Tag or [[{{/tag (some characters that would not mistakenly be typed) and then replace them back after strip_tags

NOTE. only on the tags you wish to allow.

Sign up to request clarification or add additional context in comments.

2 Comments

I guess my big mistake was the layout I did, I did stip tags before the if statements to replace and now it works like a dream. Thanks.
I suggest you to accept this answer, if it was what you were looking for :)
0

Worked. strip_tags($post,'ALLOWED TAGS HERE');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.