Welcome! » Log In » Create A New Profile

Core.CollectErrors: Status?

Posted by pinkgothic 
Core.CollectErrors: Status?
May 04, 2010 07:51AM

Just a quick question about development tasks not outlined in your TODO:

I was wondering what the current status re: Core.CollectErrors is - is there a chance the feature might be completed in the near future, or is it low-priority? :)

(I'm already using it in its current form, but would need completion for my project. As an example, when...

  <body style="background-color:#000000; color:#ffffff;">

...is turned into...


...because the ruleset does not allow for 'head' and 'body' and 'html' tags, then there's no notification.)

Re: Core.CollectErrors: Status?
May 04, 2010 01:21PM

It's fairly low priority. However, the behavior your describing looks more like a bug than a missing feature.

Re: Core.CollectErrors: Status?
May 04, 2010 01:48PM

A bug? o_O; Well, both the demo and my system seem to be doing it:


(Checking experimental features makes no difference.)

I first figured CollectErrors only collected a subset of changes that are considered 'errors' before I saw this thread (and a couple of others) where you mentioned that the eventual goal of it is to serve as a 'this snippet was changed' marker.

Is there maybe just something obvious I'm overlooking in the settings, or something I'm not understanding?

(The idea that this might be a bug is boggling my mind too much, apparently. :)) )

Edit: Whoops. Too slow posting. *takes a look at the patch*

Edit II: Okay, my understanding of HTML Purifier is still too rudimentary to glean much from that, and my actual system unfortunately isn't available to me now, but I will get back to you ASAP about it (tomorrow!). :) Thank you very much!

Re: Core.CollectErrors: Status?
May 04, 2010 02:00PM

I updated the experimental version and it seems to work.

Re: Core.CollectErrors: Status?
May 05, 2010 08:15AM

So, ironically, because of Core.ConvertDocumentToFragment (as per your excellent stackoverflow help), this is no longer an issue because with that set to false, error reporting is fine in the unpatched version, too (which is great relief since patching external libraries is a bit of a pain to get permission for in my project). :) [Not to mention TagTransform would mention the transformation even if the rest wasn't reported.]

I'm going to test it with it set to true (and the TagTransform removed) in a moment, though, and let you know if there are any snags (not that I expect any)!

Edit: Works! Thank you!

Re: Core.CollectErrors: Status?
February 26, 2011 07:28AM

In case anyone stumbles across this topic looking for exceptions of what is reported by Core.CollectErrors - since the setting forces DirectLex, any entity not found in the entities.ser file (HTMLPurifier/EntityLookup/entities.ser) will be escaped but not reported as such. An example would be be the &sup*; series (&sup1; &sup2; and &sup3;). See also: http://htmlpurifier.org/phorum/read.php?3,5348,5352

Edit: Since entities.ser should now contain all entities, this should be a non-issue.

Sorry, you do not have permission to post/reply in this forum.