Jump to content

Strip image tags except when src is own domain


renieravin

Recommended Posts

Hi, I'm new to regex, and I've been looking for a solution to this hours now - something I did not expect!  ???

 

I'm using PHP and I have a discussion forum where I use TinyMCE to post comments. The user is allowed to insert emoticons, which are stored on my server. (Example path: http://www.mysite.com/tinymce/images/emoticons/smiley.gif)

 

How do I strip all <img> tags from the comment, EXCEPT the images coming from my own domain? (www.mysite.com/tinymce/images/emoticons/)

 

Thanks in advance!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.