MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: experimental
Implementation Tag
Description Allows raw HTML & PHP include in specified namespaces
Author(s) Ike Hecht, modified by François Zajéga (frankiezafetalk)
Latest version 0.2 (January 2016)
MediaWiki 1.23+, likely earlier versions as well
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download NamespaceHTMLSCRIPT on bitbucket
<html>, <script>
Translate the NamespaceHTMLSCRIPT extension if it is available at translatewiki.net
Check usage and version matrix.

The NamespaceHTMLSCRIPT extension allows raw HTML & PHP includes in specified namespaces. It is based on the NamespaceHTML extension.

This extension allows editors to add plain PHP calls in content! Use carefully!


  • Embed raw html within <html>...</html> tags. See this page for more information.
  • Embed php code within <script>...</script> tags.

<script> echo "NamespaceHTMLSCRIPT is activated"; </script>


  • Download, extract and place the file(s) in a directory called NamespaceHTMLSCRIPT in your extensions/ folder.

  Note: $wgRawHtmlScriptNamespaces= array(); must be set!

  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.tt


An array of namespaces where raw HTML should be enabled. See this page for more information about namespace constants. For example:
$wgRawHtmlScriptNamespaces = array( NS_PROJECT ); # allow raw HTML but only in the Project namespace


  • Convert PHP output to HTML on save.
  • Disable tag depending on usergroups

See alsoEdit