mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
Setup ErrorCollector to maintain new error format, and output that HTML.
Also changed: - DirectLex keeps track of column numbers in context - New class HTMLPurifier_ErrorStruct Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -63,6 +63,7 @@ class HTMLPurifier_Lexer_DirectLex extends HTMLPurifier_Lexer
|
||||
$length = false;
|
||||
}
|
||||
$context->register('CurrentLine', $current_line);
|
||||
$context->register('CurrentCol', $current_col);
|
||||
$nl = "\n";
|
||||
// how often to manually recalculate. This will ALWAYS be right,
|
||||
// but it's pretty wasteful. Set to 0 to turn off
|
||||
@@ -312,6 +313,7 @@ class HTMLPurifier_Lexer_DirectLex extends HTMLPurifier_Lexer
|
||||
}
|
||||
|
||||
$context->destroy('CurrentLine');
|
||||
$context->destroy('CurrentCol');
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user