Home of
mail@internetcommons.ca
- comments
- suggestions

join the forum

Topics

initially posted November 24, 2009; updated December 26, 2013

Tips and Tricks
Allow javascript

By default Simplwiki does not allow parentheses in decorator values ("arguments"). This is to suppress the use of javascript. If your application requires parentheses in arguments, then you can change legal argument characters with a call to the parser's argchars method. For example, to allow all characters (including linefeed), use this call:

$wiki = new Muster\SimpleWiki();
$wiki->parser()->argchars('(?s:.)'); // any character ('.') including linefeed ('?s:')
Allow html entities

register the following method to allow embedded html entities to be rendered directly:

$simplewiki->register_charfilter_handler(array($this,'process_htmlentities'));

Then define the charfilter handler thus:

public function process_htmlentities($text,$node) // not using $node parameters
{
  return htmlentities(
	html_entity_decode($text,ENT_COMPAT | ENT_HTML401,'UTF-8'),
	ENT_COMPAT | ENT_HTML401,'UTF-8'
  );// allow html entities
}

For example © becomes ©

What runs this website?

We've made this website as, well, simple as possible.

SimpleWiki module components below are highlighted.

php code
css files
javascript
digital ocean version