I’ve been thinking about this for a while now. When I originally wrote Lightbox Plus is was pretty simple and didn’t need to do much – so I used regular expressions to find links to images and modify the links to support lightboxing before WordPress returned them. Now however Lightbox Plus does much more and I’m still using regular expressions. There are numerous problems that seem to stem from this such as not catching every image link on the page especially test links that are separated by a space or a word. So now I am planning on adding a real HTML parser to Lightbox Plus – probably something like PHP Simple HTML DOM Parser
Matthew Gedeon says
That would be pretty awesome. I have loved your plug-in except when
it didn’t pick up the images because I changed the link. Wasn’t
loving that, but I’m glad to hear that is in development.