Fenhopi Posted June 23, 2011 Share Posted June 23, 2011 Hi, I'm building a blog, and I want the user to be able to add images to their entry. But I can't quite figure out how to this without risking injections. I see that most sites, such as phpfreaks has the img tags with brackets. Any suggestions how I'd go about doing that? All help appreciated! Quote Link to comment Share on other sites More sharing options...
Alex Posted June 23, 2011 Share Posted June 23, 2011 Those tags are called bbcode (bulletin board code). You can find plenty of PHP scripts for parsing bbcode online. There's even a PECL package for it. I'd suggest googling "PHP bbcode parser" or something similar. Quote Link to comment Share on other sites More sharing options...
Fenhopi Posted June 23, 2011 Author Share Posted June 23, 2011 Alright, thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.