Changeset 45271

Show
Ignore:
Timestamp:
05/11/08 17:53:28 (2 months ago)
Author:
Aaron Harun
Message:

Removed embedded JS hack.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ajaxd-wordpress/trunk/modules/ajaxnav/ajaxnav.php

    r45246 r45271  
    238238            $response = str_replace('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] ,get_settings('siteurl'),$match[0]); 
    239239 
    240             $actions = AWP_nav::find_JS($response); 
    241  
    242240            if(!$response){ 
    243241                  echo __('AJAX Page could not be loaded.','awp'); exit;} 
     
    247245 
    248246            AWP::make_response($response, $vars,$actions); 
    249       } 
    250  
    251       function find_JS($response){ 
    252       global $id, $aWP,$awpall; 
    253             $actions = array(); 
    254             preg_match_all('!\<script[^>]*\>([\S\s]*?)\<\/script\>!ims',$response,$matches, PREG_SET_ORDER); 
    255  
    256             if(count($matches) > 0){ 
    257                   foreach($matches as $match){ 
    258                         $match = str_replace(array('<!--','-->','/*','*/','<![CDATA[',']]>'),'',$match[1]); 
    259                         $actions[] = "setTimeout(\"try{".trim($match)."}catch(e){}\",1000);"; 
    260                   } 
    261             } 
    262  
    263       return $actions; 
    264247      } 
    265248