Skip to content

Commit

Permalink
Allow style HTML attribute in video tag in body (#4426)
Browse files Browse the repository at this point in the history
This enables templates and experiments with embedded videos of custom
size.
  • Loading branch information
RememberSammyJenkins committed Jun 21, 2023
1 parent de2748f commit d533581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public static function body(?string $input = null): string
// create base config for html5
$config = HTMLPurifier_HTML5Config::createDefault();
// allow only certain elements
$config->set('HTML.Allowed', 'div[class|style],br,p[class|style],sub,img[src|class|style|width|height],sup,strong,b,em,u,a[href],s,span[style],ul,li,ol[style],dl,dt,dd,blockquote,h1[class|style],h2[class|style],h3[class|style],h4[class|style],h5[class|style],h6[class|style],hr,table[style|data-table-sort|border],tr[style],td[style|colspan|rowspan],th[style|colspan|rowspan],code,video[src|controls],audio[src|controls],pre[class],details,summary,figure,figcaption');
$config->set('HTML.Allowed', 'div[class|style],br,p[class|style],sub,img[src|class|style|width|height],sup,strong,b,em,u,a[href],s,span[style],ul,li,ol[style],dl,dt,dd,blockquote,h1[class|style],h2[class|style],h3[class|style],h4[class|style],h5[class|style],h6[class|style],hr,table[style|data-table-sort|border],tr[style],td[style|colspan|rowspan],th[style|colspan|rowspan],code,video[src|controls|style],audio[src|controls],pre[class],details,summary,figure,figcaption');
$config->set('HTML.TargetBlank', true);
// configure the cache for htmlpurifier
$tmpDir = FsTools::getCacheFolder('purifier');
Expand Down

0 comments on commit d533581

Please sign in to comment.