Not Solved Nofollow external plugin BUG Fix
#6
Not Solved
The wildcard matches in this plugin are greedy:
$message = preg_replace_callback("/<a href=\"(.+)\" (.+)>(.+)<\\/a>/",  "replace_external", $message);

Causing the first regex to start matching at the first URL and continue matching all the way to the last one as a single match.

They should be lazy like this:

$message = preg_replace_callback("/<a href=\"(.+?)\" (.+?)>(.+?)<\\/a>/",  "replace_external", $message);
Reply


Messages In This Thread
Nofollow external plugin BUG Fix - by marcus123 - 2013-12-03, 06:22 PM
RE: Nofollow external plugin BUG Fix - by .m. - 2013-12-03, 06:34 PM
RE: Nofollow external plugin BUG Fix - by Dave H - 2013-12-07, 06:03 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)