Fixing pingchecker link locating code

I have installed the free pingback manager pingchecker since I wanted to be able to manually check and ping other blogs that I link to. Unfortunately for some reason the plugin doesn’t handle link tags with additional info/attributes like styles or a target. The problem is around line 270, the regexp which is used to find links needs to be updated to look like this:

inputcontent.replace(/[^<]*(<a [^>]*href=(?:"|\')([^"\']+)(?:"|\')[^>]+>([^<]+)<\/a>)/g, function () {
matches.push(Array.prototype.slice.call(arguments, 1, 4));
});

That should be enough to fix your pingchecker, I also had an issue with the first form element within the plugin being removed for some reason (probably a bug in one of my other plugins), I just added an additional form tag before the pingchecker form.

I hope, for the sake of those who have bought it, that the pro version contains a better regexp than the one in the free version…

Leave A Comment...

*