WordPress.org

Support

Support » Plugins and Hacks » Cross Domain Bug (with code fix)

Cross Domain Bug (with code fix)

  • There is an error in the code that processes cross domain links. An extra ” is being added to the end of the onclick code.

    On line 367 in class-frontend.php:
    $trackBit = ‘_gaq.push([\’_link\’, \” . $matches[2] . ‘//’ . $matches[3] . ‘\’]); return false;”‘;

    $trackBit is closed with a “

    However, later on line 394, a second ” is added after $trackBit.
    $matches[4] = ‘onclick=”javascript:’ . $trackBit . ‘”‘ . $matches[4];

    As far as I know this only affects cross domain. I think in other cases $trackBit is left open until line 394. It seems to work properly if I remove the ” from line 367 after return false;

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cross Domain Bug (with code fix)’ is closed to new replies.