Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

IFrame Remove Filter

Security covered Maintenance fixes only 487 sites

This module provides a filter for text formats that removes all iframes from content, except for those whose source URL is on a configurable whitelist. This helps prevent malicious iframe injections while still allowing trusted embeds.

IFrames are great old way to embed content of another site to yours. This also make it a good way to start a cross-site attack.

It's both good and bad thing to let your site users to add iframe in their contents. On one hand, if a users is doing "Full HTML" in their content, they would certainly want to embed iframe (YouTube, Google Maps). But if one of your users is naughty, or if your site is somehow hacked, they would want to sneak malicious iframe attack in, too.

Can we remove all the iframe(s), except the ones we trust?

That's what this module does.

It provides a filter that you may add to text formats (Full HTML, Filtered HTML). The filter will remove every iframe it found except "src" from the whitelist.

Easy to config. Easy to use.

Usage

  1. Open your site's admin interface
  2. Go to "Configruation" > "Text formats"
  3. Open "configure" of the text format that you want to apply the filter
  4. Check "iFrame removing filter"
  5. At "Filter Settings" > "iFrame removing filter", fill-in the whitelist domains. You need to put in 1 domain per line. You may use wildcard character "*" to match multiple characters
  6. Click "Save Configurations"
Drupal 10–11

Ask your assistant about IFrame Remove Filter

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
May 2024
Latest release
3 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.1.0 Stable 10–11 Jun 18, 2026
2.1.x-dev Dev 10–11 Jun 12, 2026
2.0.5 Stable 8–11 May 7, 2025
2.0.4 Stable 8–11 May 17, 2024
2.0.3 Stable 8–11 May 15, 2024