libdir/filterlib.php"); require_once("$CFG->libdir/ajax/ajaxlib.php"); /// Constants /// Define text formatting types ... eventually we can add Wiki, BBcode etc /** * Does all sorts of transformations and filtering */ define('FORMAT_MOODLE', '0'); // Does all sorts of transformations and filtering /** * Plain HTML (with some tags stripped) */ define('FORMAT_HTML', '1'); // Plain HTML (with some tags stripped) /** * Plain text (even tags are printed in full) */ define('FORMAT_PLAIN', '2'); // Plain text (even tags are printed in full) /** * Wiki-formatted text * Deprecated: left here just to note that '3' is not used (at the moment) * and to catch any latent wiki-like text (which generates an error) */ define('FORMAT_WIKI', '3'); // Wiki-formatted text /** * Markdown-formatted text http://daringfireball.net/projects/markdown/ */ define('FORMAT_MARKDOWN', '4'); // Markdown-formatted text http://daringfireball.net/projects/markdown/ /** * TRUSTTEXT marker - if present in text, text cleaning should be bypassed */ define('TRUSTTEXT', '#####TRUSTTEXT#####'); /** * Javascript related defines */ define('REQUIREJS_BEFOREHEADER', 0); define('REQUIREJS_INHEADER', 1); define('REQUIREJS_AFTERHEADER', 2); /** * Allowed tags - string of html tags that can be tested against for safe html tags * @global string $ALLOWED_TAGS */ global $ALLOWED_TAGS; $ALLOWED_TAGS = '