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
This site uses Akismet to reduce spam. Learn how your comment data is processed.