Lines Matching refs:match

109     function rewrite_match_medium($match)  argument
111 if (preg_match('/<FORM(.*?)>/i', $match, $matches))
115 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $action[1]);
118 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $onsubmit[1]);
121 elseif (preg_match('/<script/i', $match))
123 return $this->script_matches($match, 2);
125 elseif (preg_match('/<IFRAME/i', $match, $matches))
127 return $this->getError(HTML_OK_EXCLUDEDWINDOW, $match, "IFRAME");
129 elseif (preg_match('/<ILAYER/i', $match, $matches))
131 return $this->getError(HTML_OK_EXCLUDEDWINDOW, $match, "ILAYER");
133 elseif (preg_match('/<(DIV)/i', $match, $matches))
136 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $matches[1], "div");
138 elseif (preg_match('/<a.*?javascript.*?<\/a\s*>/i', $match))
140 return $this->getError(HTML_OK_NOTSUPPORTED, $match, "javascript urls");
142 elseif (preg_match('/<STYLE/i', $match))
144 return $this->style_matches($match, 2);
146 elseif (preg_match('/<TABLE/i', $match, $matches))
148 return $this->getError(HTML_OK_NOTSUPPORTED, $match, "TABLE");
151 $retv = $this->class_id_matches($match);
154 return $match;
161 function rewrite_match_strict($match) argument
163 if (preg_match('/<FORM/i', $match))
165 return $this->getError(HTML_OK_NOTSUPPORTED, $match, 'FORM');
167 } elseif (preg_match('/<script/i', $match))
169 return $this->getError(HTML_OK_NOTSUPPORTED, $match, 'SCRIPT');
171 } elseif (preg_match('/<IFRAME/i', $match, $matches))
173 return $this->getError(HTML_OK_EXCLUDEDWINDOW, $match, "IFRAME");
175 elseif (preg_match('/<ILAYER/i', $match, $matches))
177 return $this->getError(HTML_OK_EXCLUDEDWINDOW, $match, "ILAYER");
179 } elseif (preg_match('/<(DIV)/i', $match, $matches))
182 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $matches[1], "div");
184 } elseif (preg_match('/<TABLE/i', $match, $matches))
186 return $this->getError(HTML_OK_NOTSUPPORTED, $match, "TABLE");
188 } elseif (preg_match('/<STYLE/i', $match))
190 return $this->getError(HTML_OK_NOTSUPPORTED, $match, "STYLE");
192 } elseif (preg_match('/<a.*?javascript.*?<\/a\s*>/i', $match))
194 return $this->getError(HTML_OK_NOTSUPPORTED, $match, "javascript urls");
197 $retv = $this->class_id_matches($match);
200 return $match;
203 function rewrite_match_lax($match) argument
206 if (preg_match('/<FORM(.*?)>/i', $match, $matches))
210 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $matches[1], "form");
213 } elseif (preg_match('/<STYLE/i', $match))
215 $match = $this->style_matches($match, 3);
216 return $match;
218 } elseif (preg_match('/<(IFRAME|ILAYER)/i', $match, $matches))
220 return $this->getError(HTML_OK_EXCLUDEDWINDOW, $match, $matches[1], "");
222 } elseif (preg_match('/<script/i', $match))
224 return $this->script_matches($match, 3);
226 } elseif (preg_match('/<(DIV)/i', $match))
232 $retv = $this->class_id_matches($match, $div);
235 return $match;
241 function rewrite_match_su($match) argument
245 return $match;
248 if (preg_match('/<STYLE/i', $match))
250 $match = $this->style_matches($match, 4);
251 return $match;
252 } elseif (preg_match('/<(DIV)/i', $match))
258 $retv = $this->class_id_matches($match, $div);
261 return $match;
264 function script_matches($match, $level) argument
268 if (preg_match('/\blocation\b/', $match))
270 return $this->getError(HTML_OK_NOTSUPPORTED, $match, "location");
273 if (preg_match('/(ActiveX|XMLHttpRequest)/i', $match, $matches))
275 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $matches[1]);
278 …eg_match('/(onsubmit|addEventListener|createEvent|attachEvent|captureEvents)/i', $match, $matches))
280 return $this->getError(HTML_OK_NOTSUPPORTED, $match, $matches[1]);
284 if (preg_match_all('/function\s+(.*?)[\s\n]*\(/i', $match, $matches))
295 return $this->getError(HTML_OK_BADFNNAME, $match, $err);
299 return $match;
302 function class_id_matches($match, $div = "") argument
304 if (preg_match('/id\s*=\s*\W?(.*)/i', $match, $matches))
310 return $this->getError(HTML_OK_INVALIDID, $match, $value, $div);
314 if (preg_match('/class\s*=\s*\W?(.*)/i', $match, $matches))
320 return $this->getError(HTML_OK_INVALIDID, $match, $value, $div);
332 function style_matches($match, $level) argument
334 if (!isset($match)) return "";
336 if ($level == 2 && preg_match_all('/(#\w+)/', $match, $matches))
345 return $this->getError(HTML_OK_BADSELECTOR, $match, $err);
349 if (preg_match_all('/\.(\w+)/', $match, $matches))
361 return $this->getError(HTML_OK_BADCLASSNAME, $match, $err);
364 return $match;
370 function handle($match, $state, $pos, Doku_Handler $handler) argument
381 $match = preg_replace ('/</', '&lt;', $match) . '<br />';
382 return array($state, $match);
392 return array($state, $match);
396 if (preg_match('/\/DIV\s*>/i', $match))
402 $match = $this->rewrite_match_strict($match);
405 $match = $this->rewrite_match_medium($match);
408 $match = $this->rewrite_match_lax($match);
411 $match = $this->rewrite_match_su($match);
414 return array($state, $match);
418 if (preg_match('/<h(\d)>.*?<\/\\1>/i', $match, $matches))
420 … $match = preg_replace('/<h\d>/', '<h' . $matches[1] . ' style="border-bottom:0px;">', $match);
424 return array($state, $match);
435 return array($state, $match);
439 return array($state, $match);
454 list($state, $match) = $data;
460 $renderer->doc .= $match;
463 $renderer->doc .= $match;
486 function getError($TYPE, $match, $problem_str, $xtra = "") argument
501 $error_string .= compact_string(preg_replace ('/</', '&lt;', $match)) . '<br />';