Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

IFrame Remove Filter

376 sites Security covered Drupal 10–11
View on drupal.org

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"

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
3
Tracked since
May 2025
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core 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