コード例 #1
0
 /**
  * Construct a sanitiser from a given HTMLEditorConfig
  *
  * Note that we build data structures from the current state of HTMLEditorConfig - later changes to
  * the passed instance won't cause this instance to update it's whitelist
  *
  * @param HTMLEditorConfig $config
  */
 public function __construct(HTMLEditorConfig $config)
 {
     $valid = $config->getOption('valid_elements');
     if ($valid) {
         $this->addValidElements($valid);
     }
     $valid = $config->getOption('extended_valid_elements');
     if ($valid) {
         $this->addValidElements($valid);
     }
 }