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! Link to comment https://forums.phpfreaks.com/topic/240167-letting-the-user-use-image-tags/ 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. Link to comment https://forums.phpfreaks.com/topic/240167-letting-the-user-use-image-tags/#findComment-1233709 Share on other sites More sharing options...
Fenhopi Posted June 23, 2011 Author Share Posted June 23, 2011 Alright, thank you! Link to comment https://forums.phpfreaks.com/topic/240167-letting-the-user-use-image-tags/#findComment-1234089 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.