Entry details

Author

SeSam

Date

December 19th, 2008

Comments

1 Comment so far.
Add yours.

Analytics plugin bug

You may have noticed a recent issue with comment author links: they had  ’%20rel=’external%20nofollow” appended to the end of the URL. Apparently this is an incompatibility bug with the Google Analytics plugin by Rich Boakes (v0.68) and the latest release of WP. I found a thread on the WP support forums detailing a fix which I’m happy to say works. Simply change the following line in googleanalytics.php:

function comment_author_link($text) {
	static $anchorPattern = '(.*href\s*=\s*)[\"\']*(.*)[\"\'] (.*)';

To this:

function comment_author_link($text) {
	static $anchorPattern = '(.*href\s*=\s*)[\"\']*(.*\?)[\"\'] (.*)';

Gotta love regexp. :)

Comments to this entry

Mica bug al plugin-ului Google Analytics (Rich Boakes)
December 21, 2008
5:17 am
[...] Daca va uitati mai bine e vorba doar de un semnul intrebarii. Care semnul intrebarii mi-a pus si mie cateva semne de intrebare pana am dat de asta. [...]

Your thoughts