Changeset 103

Show
Ignore:
Timestamp:
04/16/07 01:19:13 (2 years ago)
Author:
abunner
Message:

Since we are now passing longer URLs to the ad engine in both the /js and /show calls, make sure the fall through url is short enough to not cause trouble for goog

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/abunner-adserver/lib/SixApart/AdEngine/Network/AdSense.pm

    r97 r103  
    5454        # Don't fall through for 728x15 ads because our other networks (presently Accipiter) don't support it / abunner 2006-12-20 
    5555        if ($width != 728 || $height != 15) { 
    56             $data .= "    google_alternate_ad_url = \"" . encode_entities($fall_thru_url) . "\";\n"; 
     56            my $encoded_fall_thru_url = length($fall_thru_url) <= 728 ? $fall_thru_url : substr($fall_thru_url, 0, 768); 
     57             
     58            SixApart::AdEngine::Base::ejs_lossy(\$encoded_fall_thru_url); 
     59             
     60            $data .= "    google_alternate_ad_url = \"" . $encoded_fall_thru_url . "\";\n"; 
    5761        } 
    5862    }