How to filter URLs for embedded IMG tags? This is a great presentation about Drupal security. They were talking about ways to only allow  tags from certain trusted domains. 

Any ideas how to do that? I couldn't find a D7 module for that.
If you mean disallowing &lt;img&gt; elements where the src isn't on a whitelist, then you can make a custom input filter.

The first step is to make a hook_filter_info to declare your input filter.  You would then make a callback function that does the work.

The callback would do some regex matching, looking for &lt;img&gt; elements and pulling out the src attributes.  Then regex match the src against your whitelisted domains.  If everything is OK, let the image pass, else replace it with whitespace.

Finally, make a hook_menu which sets up a settings page so you can enter your whitelist via the UI.

Once you have done all of this, you add your filter to the appropriate input formats.  When the page gets rendered out, the filter will be applied.

All of this is rather easy.  The heavy listing is the &lt;img&gt; regex, but I suspect 15 min of googling will find some good ones.