Raw HTML in protected templates

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Raw HTML in protected templates

Martin Jambon

Consider the following extension which allows raw HTML in protected pages

$wgExtensionFunctions[] = "RawHtmlExtension";

function RawHtmlExtension() {
   global $wgParser;
   $wgParser->setHook("rawhtml", "renderRawHtml");

function renderRawHtml($input) {
   global $wgTitle;
   $result = $wgTitle->isProtected() ? $input : '';
   return $result;

Is there a simple way of including a protected template which uses this
rawhtml extension so that it actually displays the HTML correctly? A
regular unprotected page refuses to display the raw HTML from the
template although the template itself is protected.

Well, it's not such a big problem, but maybe other people already have a
nice solution to that problem.



Martin Jambon, PhD

Visit http://wikiomics.org, the Bioinformatics Howto Wiki
MediaWiki-l mailing list
[hidden email]