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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user