سؤال

please help me understand what I'm doing wrong. I'm trying to use HtmlPurifier with a Html.Allowed whitelist, but the results are just messed up.

Here is an example of Html.Allowed disabled – everything works as expected. Now I set a whitelist containing all used tags (span, p, ul, li) and HtmlPurifier throws warnings and returns an unexpected result, see here.

I have spent hours trying to find my mistake. Any help is much appreciated!

David

هل كانت مفيدة؟

المحلول

It's a bug. If you add 'div' to your Allowed list, you will have the desired effect.

It has been fixed in:

commit 0680832d41d4d5377ea3ea8d8c10fd574d2deb7e
Author: Edward Z. Yang 
Date:   Tue May 21 17:19:59 2013 -0700

    Use info_parent_def to get parent information, since it may not be present in info array.

    Signed-off-by: Edward Z. Yang 
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top