46        $this->removeNbsp = 
$config->get(
'AutoFormat.RemoveEmpty.RemoveNbsp');
 
   47        $this->removeNbspExceptions = 
$config->get(
'AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions');
 
   48        $this->exclude = 
$config->get(
'AutoFormat.RemoveEmpty.Predicate');
 
   49        foreach ($this->exclude as 
$key => $attrs) {
 
   50            if (!is_array($attrs)) {
 
   52                $this->exclude[
$key] = explode(
';', $attrs);
 
   68        for (
$i = count($this->inputZipper->back) - 1; 
$i >= 0; 
$i--, $deleted++) {
 
   69            $next = $this->inputZipper->back[
$i];
 
   71                if ($next->is_whitespace) {
 
   74                if ($this->removeNbsp && !isset($this->removeNbspExceptions[$token->name])) {
 
   75                    $plain = str_replace(
"\xC2\xA0", 
"", $next->data);
 
   76                    $isWsOrNbsp = $plain === 
'' || ctype_space($plain);
 
   85            $this->attrValidator->validateToken($token, $this->config, $this->context);
 
   86            $token->armor[
'ValidateAttributes'] = 
true;
 
   87            if (isset($this->exclude[$token->name])) {
 
   89                foreach ($this->exclude[$token->name] as $elem) {
 
   90                    if (!isset($token->attr[$elem])) 
$r = 
false;
 
   94            if (isset($token->attr[
'id']) || isset($token->attr[
'name'])) {
 
   97            $token = $deleted + 1;
 
   98            for ($b = 0, $c = count($this->inputZipper->front); $b < $c; $b++) {
 
   99                $prev = $this->inputZipper->front[$b];
 
An exception for terminatinating execution or to throw for unit testing.
Validates the attributes of a token.
$removeNbspExceptions
@type bool
$exclude
Cached contents of AutoFormat.RemoveEmpty.Predicate @type array.
$attrValidator
@type HTMLPurifier_AttrValidator
$config
@type HTMLPurifier_Config
$context
@type HTMLPurifier_Context
prepare($config, $context)
Injects tokens into the document while parsing for well-formedness.
rewindOffset($offset)
Rewind to a spot to re-perform processing.
Concrete end token class.
Concrete start token class.
Concrete text token class.