26 public static function clean($html)
29 'html' =>
array(
'xmlns'),
32 'meta' =>
array(
'content',
'name',
'http-equiv'),
35 'link' =>
array(
'type',
'rel',
'href'),
39 foreach ($tags as $tagName => $attributes)
41 $tags[$tagName] = array_merge($attributes, $commonAttributes);
44 $sanitizer = new \CBXSanitizer();
46 $sanitizer->addTags($tags);
47 $sanitizer->allowAttributes([
53 'content' =>
function ()
59 $sanitizer->applyDoubleEncode(
false);
61 $storedMap = self::replacePhpToTags($html);
62 $html = $sanitizer->sanitizeHtml($html);
63 self::replaceTagsToPhp($html, $storedMap);