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.
2 Answers
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.
2 Comments
Devon117
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.
Erenor Paz
I suggest you to accept this answer, if it was what you were looking for :)