HTMLPurifier demo use the config createdefault ? I have a difference with unit VH, it's no filtered.

43 views
Skip to first unread message

Clorel

unread,
Jul 14, 2021, 9:38:19 AM7/14/21
to htmlpurifier
I ask because, i have differences with htmlpurifier 4.13 and the demo website :
In my website, i use : 
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$clean_html = $purifier->purify($dirty_html);


InputDirty :
<div style="position: fixed; top: 0; left: 0; right: 0; z-index: 2; bottom: 0; height: 100vh; scroll-snap-type: y mandatory; overflow: scroll;" onclick="new Audio('https://www.mboxdrive.com/layers-of-fear-soundtrack-music-box.mp3').play(); this.onclick = null"><a class="link" style="padding: 2rem; position: fixed; top: 0; left: 0;" href="login"><img style="transition: transform .25s; opacity: 1;" onmouseover="this.style.transform = scale(1.2)" src="https://image.noelshack.com/fichiers/2018/27/4/1530827992-jesusreup.png" alt="" /></a>
</div>

Clean from my site / htmlpurifier 4.13 :
<div style="height:100vh;"><a class="link" style="padding:2rem;" href="login"><img src="https://image.noelshack.com/fichiers/2018/27/4/1530827992-jesusreup.png" alt="" /></a>
</div>

Clean from demo :
<div><a class="link" href="login"><img src="https://image.noelshack.com/fichiers/2018/27/4/1530827992-jesusreup.png" alt="" /></a>
</div>

Thanks for your answers
Reply all
Reply to author
Forward
0 new messages