1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-01 11:50:28 +02:00

Update configuration scanner to parse new format.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang
2009-07-07 22:32:44 -04:00
parent ba9fd175d7
commit 6776efccdd
2 changed files with 443 additions and 10 deletions

View File

@@ -108,19 +108,11 @@ foreach ($files as $file) {
consumeWhitespace($tokens, $i);
if (!testToken($tokens[$i], T_CONSTANT_ENCAPSED_STRING)) continue;
$namespace = substr($tokens[$i][1], 1, -1);
consumeWhitespace($tokens, $i);
if (!testToken($tokens[$i], ',')) continue;
consumeWhitespace($tokens, $i);
if (!testToken($tokens[$i], T_CONSTANT_ENCAPSED_STRING)) continue;
$directive = substr($tokens[$i][1], 1, -1);
$id = substr($tokens[$i][1], 1, -1);
$counter++;
$matched = true;
$id = "$namespace.$directive";
if (!isset($tracker[$id])) $tracker[$id] = array();
if (!isset($tracker[$id][$file])) $tracker[$id][$file] = array();
$tracker[$id][$file][] = $line;