Jeff Waugh
Member
Posted 3 years ago #
Using g-a 2.21 + WordPress 2.7 + Sandbox... ga_outgoing_comment_author is a little bit hungry, which breaks URLs in comments. Just needs a bit of a regex "controlled diet" to be happy. :-)
(Sorry, not quoting the entire patch here on the forum... this summary will give you the fix anyway.)
Thanks for g-a!
function ga_outgoing_comment_author($input) {
- static $link_pattern = '(.*href\s*=\s*)[\"\']*(.*)[\"\'] (.*)';
+ static $link_pattern = '(.*href\s*=\s*)[\"\']*(.*?)[\"\'] (.*)';
Thanks for the heads up. Just released a patch.
Jeff Waugh
Member
Posted 3 years ago #
Jeff Waugh
Member
Posted 3 years ago #
Looks like you have a leeeettle merge problem at the top of the php file:
* Plugin Name: Google Analyticator
<<<<<<< .mine
* Version: 2.23
=======
* Version: 2.22
>>>>>>> .r78429
Jeff Waugh
Member
Posted 3 years ago #
Your final fix was much better. ;-)
can I ask... why aren't you just adding these onclicks on the client side using jQuery? It would make the plugin much simpler, and the javascript far less intrusive.
A while back I was using Javascript to add the links, but it resulted in several Javascript conflicts. I may have had a crappy implementation, but I haven't noticed any problems with just adding the onclick via a filter.