From f2d0c6aa7e268044764daf32f9f029bada9892b9 Mon Sep 17 00:00:00 2001 From: attosoft Date: Fri, 11 May 2012 05:03:06 +0000 Subject: [PATCH] Fix: anchor-utils filter does not detect an empty anchor tag (e.g. ``), props Olivier Burgard. If an empty anchor tag is in front of image link, "thickbox" class cannot be added to the link then the image cannot be overlaid by click. --- anchor-utils/anchor-utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anchor-utils/anchor-utils.php b/anchor-utils/anchor-utils.php index 556b161..9885b93 100644 --- a/anchor-utils/anchor-utils.php +++ b/anchor-utils/anchor-utils.php @@ -51,7 +51,7 @@ class anchor_utils { <\s*a\s+ ([^<>]+) > - (.+?) + ((?!<\s*\/\s*a\s*>).+?) <\s*\/\s*a\s*> /isx", array('anchor_utils', 'ob_filter_callback'), $text); @@ -118,7 +118,7 @@ class anchor_utils { <\s*a\s+ ([^<>]+) > - (.+?) + ((?!<\s*\/\s*a\s*>).+?) <\s*\/\s*a\s*> /isx", array('anchor_utils', 'filter_callback'), $text);