extend 70f84bf even more

to prevent empty regular expression errors in preg_replace()
This commit is contained in:
Ian 2014-12-29 16:21:59 +01:00
parent 70f84bf222
commit ade461e112

View file

@ -171,6 +171,11 @@ class serendipity_event_lightbox extends serendipity_event {
$regex = '/<a([^>]+)(href=(["\'])[^"\']*\.(jpe?g|gif|png)["\'])/i';
$sub = '<a rel=$3onemagnificPopup$3 $1 $2';
}// do not use 'class' here as identifier, whenever possible, since this conflicts/not validates with $1 'class'es
else { // force even more to prevent empty regular expression errors in preg_replace()
$type = 'lightbox2jq';
$regex = '/<a([^>]+)(href=(["\'])[^"\']*\.(jpe?g|gif|png)["\'])/i';
$sub = '<a $1 rel=$3lightbox$3 $2';
}
}
switch($event) {