What I would suggest is implementing the doubly linked list much in the same way you would have implemented it in C. So do not implement an iterator, keep the classes for the nodes of the linked list but drop the "wrapper" class for the entire linked list. MakeWellFormed has a pointer to the first element of the list which gets updated as we traverse. It's probably worth considering what the overby Ambush Commander - Internals
Hmm, this wouldn't be too hard to add to the Generator.php class. I'm not going to implement it though. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
Yep, you got it. DirectLex is slower than DOMLex, but it is more precise. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Yeah, this is a known infelicity with how the DOM parser works. You can avoid it by using the DirectLex parser. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
OK, sorry about dragging my feet; this will probably have to wait until this summer. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - General
Dupe of http://stackoverflow.com/questions/16660575/htmlpurifier-autoparagraph-html-allowed HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Hmm, on further thought, I think I don't care. Committed. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
Comma is a valid character in URLs, the non-breaking space change seems reasonable though. Perhaps a compromise we can make is only break on comma if it is immediately followed by a space. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
I guess my point is, if you are planning on not using this iterating functionality, don't give an interface that talks about numeric indexes. Looking at what the code is doing right now, it all hinges around the $this->t variable, which is a numeric offset. Replace that instead with the current node, and all of the functions you need should magically resolve themselves. Don’t slavishly adherby Ambush Commander - Internals
Thanks, fixed. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
I think this code does a quite few suboptimal things. In particular, the notion of a cursor into the list is built into the array, whereas a more standard design is to have an external iterator object, or even just manipulate the list nodes directly. Similarly, findIndex iterates over the list, which is absolutely wacky! If I have a node, I get efficient O(1) access before and after. Don't exposeby Ambush Commander - Internals
Dupe of http://stackoverflow.com/questions/16455997/how-to-use-html-purifier-with-a-3rd-party-autoloader HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
OK, updated, thanks. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - General
There's no built-in knob. You'll have to do something like look at the code which implements safe embed (and is also responsible for flipping the attributes to "safe" values and regex against it. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Hmm, well, maybe that applet does in fact need script access. You'll have to whitelist it or something, in that case (allowing script access is NOT safe in general) HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
What is the resulting HTML post purification? HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Try %HTML.SafeEmbed HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
OK. It will take me a little bit of time to CR this properly; sorry about the delay. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
OK, I've updated it. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Works for me. What input are you giving it? HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
OK, it looks like there is a problem here. I'll take a look, but it's been a while since I setup the PEAR packaging scripts for HTML Purifier and I'm a bit rusty. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Drop SPL, since it's not really SPL. Some other code review comments: this code uses references (&) quite a bit. In PHP5, object identity semantics work the way you'd expect them to, so as long as the entities being passed around are objects, they should get shared automatically. I'd expect most of the ampersands to not be necessary. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
Assuming that you've reported accurate symptoms, my guess is something is going and scribbling over HTML Purifier's library files. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Do you have access to error logs on GoDaddy? It's really hard to debug a 500 error without them... could be anything. For the files, the best way is to redownload the copy of HTML Purifier and them compare it on your machine to a "pristine" version. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
What is the error you get when HTML Purifier "breaks"? Can you take md5sums of all the files in the library and compare them before and after? HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
Ugh, looks like that's true. What a travesty. Would it be possible to rename HTMLPurifier_Array to something that is more accurate? HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
commit 6e37ecd1c8389db63445fcfe7490db1b7b6a8383 Author: Edward Z. Yang <ezyang@mit.edu> Date: Tue Apr 16 13:46:00 2013 -0700 Make URI parsing algorithm more strict. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
Hmm, I wonder if we should be using http://docs.php.net/manual/en/class.spldoublylinkedlist.php HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Internals
Ah yes, that's pretty unfortunate. Unfortunately, that'll be a problem with any PHP library that gets bundled with software. HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support
You only get one trace? The only other possible explanation is an autoloader that is defining HTMLPurifier_Bootstrap automatically (or some other part of your codebase is defining it). What do your autoloaders look like? HTML Purifier, Standards-Compliant HTML Filteringby Ambush Commander - Support