Table of Contents
Config:HTMLOk Plugin
Compatible with DokuWiki
No compatibility info given!
Security warning (please read plugin security guidelines): This extension will allow execution of scripts. It should only be used when you trust ALL editors, best suited in private personal wikis.
Similar to htmlok
This is the Config:HTMLOk plugin. What it does is basically the same as the config:htmlok
option in DokuWiki versions previous to Igor: if the plugin is enabled and configured, it allows you to use raw HTML sections in your wikicode.
This plugin does not offer raw PHP move (aka: the old config:phpok
mode). For plugins that allow for executing PHP and rendering the result on the wikicode see eg.: phpwikify.
This plugin has been moved from htmlokalt. If you have installed that plugin (and not htmlok), the safest way to upgrade is to remove that plugin and install confightmlok
instead.
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Heed the security notice above. While it is possible to add your own sanitizer to the working of this plugin, it is not the default behaviour.
Configuration
use_sure
,use_really_sure
:
If you have installed this plugin and want to use it, make sure to enable the two “are you sure” options in the configuration. Both options must be enabled for HTML wikicode to be parsed.
sanitizer
:
The plugin gives you the option to run the HTML wikicode through your own sanitizer before rendering. If you have such sanitizer enabled, enter its function name in this box. The function name must be a valid PHP function name that has only uppercase or lowercase letters, digits and _
(underscore), and the function signature must be of the form function($string) → $string
.
If no function name is provided, this feature does nothing, and HTML wikicode is passed to the renderer without modifications.
If an invalid function name is provided, the HTML is passed through without modifications, and a warning message is sent.
In order for an external sanitizer function to be invoked, it has to exist or be included by the time the plugin loads. The safest way to do this is to
include_once
or require_once
the header containing the sanitizer in inc/preload.php
.
Examples/Usage
Once this plugin is installed and enabled as detailed below, old wikicode using <html>
tags should be working correctly.
Syntax
Basic syntax:
<html> some inline level HTML code </html> <HTML> some block level HTML code </HTML>
Development
Change Log
Future Development
The following two features are planned to be added to the plugin at some point in the future:
- Enable inline level html and block level HTML separately.
- Implemented 2023-04-13.
Allow the admin to invoke an external HTML sanitizer function.
Discussion
Issues can be raised at the issue tracker. Complaining behaviour that contributes nothing to the discussion will be moderated.