This enables "formatter-like" functionality such as auto-paragraphing, smiley-ification and linkification to take place.
 public function prepare($config, $context)
 {
     $this->sanitizer = new HTMLPurifier_AttrDef_URI();
     $this->config = $config;
     $this->context = $context;
     return parent::prepare($config, $context);
 }
 public function prepare($config, $context)
 {
     $this->attrValidator = new HTMLPurifier_AttrValidator();
     $this->config = $config;
     $this->context = $context;
     return parent::prepare($config, $context);
 }
 public function prepare($config, $context)
 {
     parent::prepare($config, $context);
     $this->config = $config;
     $this->context = $context;
     $this->removeNbsp = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp');
     $this->removeNbspExceptions = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions');
     $this->attrValidator = new HTMLPurifier_AttrValidator();
 }
 /**
  * @param HTMLPurifier_Config  $config  Configuration.
  * @param HTMLPurifier_Context $context Context.
  */
 public function prepare($config, $context)
 {
     parent::prepare($config, $context);
     $this->linkTextLength = $config->get('AutoFormat.LinkifyWithTextLengthLimit.Limit');
     $this->linkTextSuffix = $config->get('AutoFormat.LinkifyWithTextLengthLimit.Suffix');
     $this->linkTextRemoveProtocol = $config->get('AutoFormat.LinkifyWithTextLengthLimit.RemoveProtocol');
     if (!$this->linkTextLength) {
         $this->linkTextLength = null;
     }
 }
Example #5
0
 /**
  * @param HTMLPurifier_Config $config
  * @param HTMLPurifier_Context $context
  * @return void
  */
 public function prepare($config, $context)
 {
     parent::prepare($config, $context);
     $this->config = $config;
     $this->context = $context;
     $this->removeNbsp = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp');
     $this->removeNbspExceptions = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions');
     $this->exclude = $config->get('AutoFormat.RemoveEmpty.Predicate');
     foreach ($this->exclude as $key => $attrs) {
         if (!is_array($attrs)) {
             // HACK, see HTMLPurifier/Printer/ConfigForm.php
             $this->exclude[$key] = explode(';', $attrs);
         }
     }
     $this->attrValidator = new HTMLPurifier_AttrValidator();
 }
Example #6
0
 /**
  * @param HTMLPurifier_Config $config
  * @param HTMLPurifier_Context $context
  * @return void
  */
 public function prepare($config, $context)
 {
     parent::prepare($config, $context);
 }
 public function prepare($config, $context)
 {
     $this->docURL = $config->get('AutoFormat.PurifierLinkify.DocURL');
     return parent::prepare($config, $context);
 }
 function prepare($config, &$context)
 {
     $this->docURL = $config->get('AutoFormatParam', 'PurifierLinkifyDocURL');
     return parent::prepare($config, $context);
 }