| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
define('PARAM_RAW', 0x0000); |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
define('PARAM_CLEAN', 0x0001); |
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
define('PARAM_INT', 0x0002); |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
define('PARAM_INTEGER', 0x0002); |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
define('PARAM_ALPHA', 0x0004); |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
define('PARAM_ACTION', 0x0004); |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
define('PARAM_FORMAT', 0x0004); |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
define('PARAM_NOTAGS', 0x0008); |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
define('PARAM_FILE', 0x0010); |
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
define('PARAM_PATH', 0x0020); |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
define('PARAM_HOST', 0x0040); |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
define('PARAM_URL', 0x0080); |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
define('PARAM_LOCALURL', 0x0180); |
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
define('PARAM_CLEANFILE',0x0200); |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
define('PARAM_ALPHANUM', 0x0400); |
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
define('PARAM_BOOL', 0x0800); |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
define('PARAM_CLEANHTML',0x1000); |
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
define('PARAM_ALPHAEXT', 0x2000); |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
define('PARAM_SAFEDIR', 0x4000); |
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
define('FORMAT_MOODLE', '0'); |
|---|
| 108 |
|
|---|
| 109 |
/** |
|---|
| 110 |
* Plain HTML (with some tags stripped) |
|---|
| 111 |
*/ |
|---|
| 112 |
define('FORMAT_HTML', '1'); |
|---|
| 113 |
|
|---|
| 114 |
/** |
|---|
| 115 |
* Plain text (even tags are printed in full) |
|---|
| 116 |
*/ |
|---|
| 117 |
define('FORMAT_PLAIN', '2'); |
|---|
| 118 |
|
|---|
| 119 |
/** |
|---|
| 120 |
* Wiki-formatted text |
|---|
| 121 |
* Deprecated: left here just to note that '3' is not used (at the moment) |
|---|
| 122 |
* and to catch any latent wiki-like text (which generates an error) |
|---|
| 123 |
*/ |
|---|
| 124 |
define('FORMAT_WIKI', '3'); |
|---|
| 125 |
|
|---|
| 126 |
/** |
|---|
| 127 |
* Markdown-formatted text http://daringfireball.net/projects/markdown/ |
|---|
| 128 |
*/ |
|---|
| 129 |
define('FORMAT_MARKDOWN', '4'); |
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
/** |
|---|
| 133 |
* Allowed tags - string of html tags that can be tested against for safe html tags |
|---|
| 134 |
* @global string $ALLOWED_TAGS |
|---|
| 135 |
*/ |
|---|
| 136 |
$ALLOWED_TAGS = |
|---|
| 137 |
'<p><br><b><i><u><font><table><tbody><span><div><tr><td><th><ol><ul><dl><li><dt><dd><h1><h2><h3><h4><h5><h6><hr><img><a><strong><emphasis><em><sup><sub><address><cite><blockquote><pre><strike><param><acronym><nolink><lang><tex><algebra><math><mi><mn><mo><mtext><mspace><ms><mrow><mfrac><msqrt><mroot><mstyle><merror><mpadded><mphantom><mfenced><msub><msup><msubsup><munder><mover><munderover><mmultiscripts><mtable><mtr><mtd><maligngroup><malignmark><maction><cn><ci><apply><reln><fn><interval><inverse><sep><condition><declare><lambda><compose><ident><quotient><exp><factorial><divide><max><min><minus><plus><power><rem><times><root><gcd><and><or><xor><not><implies><forall><exists><abs><conjugate><eq><neq><gt><lt><geq><leq><ln><log><int><diff><partialdiff><lowlimit><uplimit><bvar><degree><set><list><union><intersect><in><notin><subset><prsubset><notsubset><notprsubset><setdiff><sum><product><limit><tendsto><mean><sdev><variance><median><mode><moment><vector><matrix><matrixrow><determinant><transpose><selector><annotation><semantics><annotation-xml><tt><code>'; |
|---|
| 138 |
|
|---|
| 139 |
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 |
$ALLOWED_PROTOCOLS = array('http', 'https', 'ftp', 'news', 'mailto', 'rtsp', 'teamspeak', 'gopher', 'mms', |
|---|
| 144 |
'color', 'callto', 'cursor', 'text-align', 'font-size', 'font-weight', 'font-style', |
|---|
| 145 |
'border', 'margin', 'padding'); |
|---|
| 146 |
|
|---|
| 147 |
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
?> |
|---|