Open main menu


MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: beta
Implementation Tag , User rights
Description Allows only sysops and certain user groups to edit pages containing the <html> tag.
Author(s) Antoine Mercier-Linteau (Tinsstalk)
Latest version 0.2b (2019-01-31)
Compatibility policy master
MediaWiki 1.31+
License GNU General Public License 2.0 or later
Translate the SaferHTMLTag extension if it is available at
Check usage and version matrix.

The SaferHTMLTag extension prevents users that are not in a group which has the edit-html allowed from editing pages which contain the <html> tag enabled through $wgRawHtml = true.


  • Download, extract and place the file(s) in a directory called SaferHTMLTag in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'SaferHTMLTag' );
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension(). If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'SaferHTMLTag' );, you need to use:

require_once "$IP/extensions/SaferHTMLTag/SaferHTMLTag.php";

Enabling for a groupEdit

To enable for a group (eg: sysops), add the following to you LocalSettings.php file:

$wgGroupPermissions['sysop']['edit-html'] = true; // Enable in-wiki HTML editing for sysops.

See alsoEdit