PHPackages                             mediawiki/iframe-tag - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mediawiki/iframe-tag

ActiveMediawiki-extension[Utility &amp; Helpers](/categories/utility)

mediawiki/iframe-tag
====================

1.1.3(3mo ago)22.8k5[1 issues](https://github.com/hexmode/mediawiki-iframe/issues)[3 PRs](https://github.com/hexmode/mediawiki-iframe/pulls)gpl-3.0PHPPHP &gt;=7.3CI passing

Since Apr 17Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/hexmode/mediawiki-iframe)[ Packagist](https://packagist.org/packages/mediawiki/iframe-tag)[ RSS](/packages/mediawiki-iframe-tag/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (14)Versions (12)Used By (0)

MediaWiki IFrameTag extension
=============================

[](#mediawiki-iframetag-extension)

This extension allows you use [iframe](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element) tags in your wiki and makes some attempt to validate the URLs being embedded in iframes. Your wiki admins will be able to use a page in the MediaWiki namespace to update the list of allowed URLs.

As of this writing, only the following attributes are supported:

 srcAddress of the resource heightVertical dimension widthHorizontal dimension allowfullscreenWhether to allow the iframe’s contents to use [requestFullscreen()](https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen) sandboxControls the restrictions applied to the content embedded in the iframe styleThis is the only [global attribute](https://www.w3.org/html/wg/spec/elements.html#global-attributes) that is supported. It is implemented via the base [tag builder class](https://packagist.org/packages/nichework/tag-builder).Configuring the allowed hosts
=============================

[](#configuring-the-allowed-hosts)

Currently, host name matching is done based on the full domain name. If a list of names is allowed hosts is given in the configuration and the host in the `src` attiribute of the `iframe` tag is not on the configured list of hosts, then the `iframe` tag is not shown on the wiki.

There are two methods for configuring permissible domains.

On Wiki configuration
---------------------

[](#on-wiki-configuration)

This method is enabled by default, but if you do not want your administrators changing the list of allowed domains, you can set `$iFrameOnWikiConfig` to false:

```
$iFrameOnWikiConfig=false;
```

If you leave the method enabled, people with the [editsitejson](https://www.mediawiki.org/wiki/Manual:User_rights#List_of_permissions) (administrators and interface administrators by default) will be able to change the value of `[[MediaWiki:IFrame-cfg.json]]`. To authorize the only three domains, the following would be used:

```
{
    "domains": [
        "one.example.com",
        "two.example.com",
        "two.example.com"
    ]
}
```

PHP Configuration
-----------------

[](#php-configuration)

This is the familiar “set a PHP variable in your `LocalSettings.php`” method.

In your `LocalSettings.php`, add a setting for the variable `$iFrameDomains` that contains an array of domains that are allowed. For example:, to authorize the same three domains as are in the above wiki configuration.

```
$iFrameDomains = [
	   'one.example.com',
	   'two.example.com',
	   'three.example.com'
];
```

How the tag is parsed
=====================

[](#how-the-tag-is-parsed)

The `src` attribute is parsed using PHP’s [parse\_url](https://www.php.net/parse_url). The schema is [verified as safe](https://github.com/hexmode/mediawiki-iframe/blob/9fefe2141e3c664f4caef48c868624e34d5de8e0/src/Handler.php#L104) (only `http`, `https` and `ftp` are allowed), the URL’s domains are checked against a list of allowed urls (if specified), any specified port is added, as is any path, query string (the part following `?`) or fragment (the part following `#`).

If problems are found with when parsing the iframe tag attributes, that attribute is skipped, notes about what went wrong are they are inserted into the page output as HTML comments.

If the `src` attribute has a problem, then the iframe tag is skipped and the author will have to check the html source to find any problems.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance68

Regular maintenance activity

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~229 days

Recently: every ~454 days

Total

9

Last Release

115d ago

PHP version history (2 changes)1.0.1PHP &gt;=7.4

1.0.2PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/091004c4b32e573a26383800e11030fc01201119f53a8fa6886aa34e80edb42d?d=identicon)[hexmode](/maintainers/hexmode)

---

Top Contributors

[![hexmode](https://avatars.githubusercontent.com/u/43581?v=4)](https://github.com/hexmode "hexmode (33 commits)")[![chigley](https://avatars.githubusercontent.com/u/1202682?v=4)](https://github.com/chigley "chigley (1 commits)")[![cscott](https://avatars.githubusercontent.com/u/156080?v=4)](https://github.com/cscott "cscott (1 commits)")[![Minionguyjpro](https://avatars.githubusercontent.com/u/66115754?v=4)](https://github.com/Minionguyjpro "Minionguyjpro (1 commits)")[![olena-stoliarova](https://avatars.githubusercontent.com/u/28828146?v=4)](https://github.com/olena-stoliarova "olena-stoliarova (1 commits)")

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mediawiki-iframe-tag/health.svg)

```
[![Health](https://phpackages.com/badges/mediawiki-iframe-tag/health.svg)](https://phpackages.com/packages/mediawiki-iframe-tag)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.6k10](/packages/helsingborg-stad-municipio)[mautic/core

Mautic Open Source Distribution

10.3k2.7k9](/packages/mautic-core)[mediawiki/maps

Adds various mapping features to MediaWiki

85155.1k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3407.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

20256.6k4](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19233.0k4](/packages/altis-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
