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
Hello,

Consider the following extension which allows raw HTML in protected pages
only:

$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.


Thanks

Martin

--
Martin Jambon, PhD
http://martin.jambon.free.fr

Visit http://wikiomics.org, the Bioinformatics Howto Wiki
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l