Extension:PlainHtml

From MediaWiki.org
Jump to: navigation, search


Warning Warning: This extension is dangerous because all contributors can include cookie-stealing JavaScript. DO NOT use it on wikis that everyone can edit.
MediaWiki extensions manual - list
Crystal Clear action run.png
PlainHtml

Release status: beta

Implementation Tag
Description Sends text directly to user's internet browser.
Author(s) Adiblol
Last version 0.1 (2008-01-23)
MediaWiki Extensions support required
License No license specified
Download see below

Check usage (experimental)

[edit] Source code

<?php
$wgExtensionFunctions[] = "wfPlainHtml";
 
function wfPlainHtml() {
 global $wgParser;
 $wgParser->setHook("plainhtml", "renderPlainhtml");
}
 
function renderPlainhtml($input, $argv, $parser) {
 return $input;
}
?>

[edit] Installation

  1. Create file called "plainhtml.php" in your extensions directory.
  2. Put source code into this file.
  3. Add following line to your LocalSettings.php file:
include('extensions/plainhtml.php');

[edit] Usage

Put any html code between <plainhtml> and </plainhtml> tags, e.g.:

<plainhtml>
<a href="#" onclick="alert('Hello! I am here!')">Click here.</a>
</plainhtml>

WARNING! This extension allows user to include script and it is dangerous for site's appearance. For user it is as dangerous as "normal" website!

[edit] Bugs

I haven't noticed any bugs, but it's beta version, however. Please write about all bugs you notice.

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox