Extension:RawMsg

The RawMsg extension adds a parser function called #rawmsg for inserting bits of raw HTML into wiki pages.

Installation

 * 1) Download RawMsg, and be sure to rename the downloaded file to RawMsg.php.
 * 2) Drop this script in $IP/extensions
 * Note: $IP is your MediaWiki install dir.
 * 1) Enable the extension by adding this line to your LocalSettings.php: require_once('extensions/RawMsg.php');

Usage
The RawMsg parser function expects to be called in the following way:

Where message-name is the name of raw HTML message to insert.

For example, calling   would grab the content of MediaWiki:rawmsg-test-pattern and insert the content directly into the page.

The MediaWiki namespace was chosen to house the HTML fragments so that only Sysops may edit them due to the XSS risk. Also, the messages must begin with 'rawmsg-' to decrease the likelihood that an obscure accidental MediaWiki article could be used as an XSS attack vector.