Changeset 8059
- Timestamp:
- 06/06/2008 08:49:45 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/press-this.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/press-this.php
r8048 r8059 90 90 91 91 // Ajax Requests 92 $url = $_REQUEST['url']; 93 $selection = $_REQUEST['selection']; 92 $title = wp_specialchars(stripslashes($_GET['t'])); 93 $selection = trim(wp_specialchars(str_replace("\n", ' ',stripslashes($_GET['s'])))); 94 $url = $_GET['u']; 94 95 95 96 if($_REQUEST['ajax'] == 'video') { ?> … … 102 103 103 104 if($_REQUEST['ajax'] == 'photo_images') { 105 $url = urldecode($url); 106 $url = str_replace(' ', '%20', $url); 107 104 108 function get_images_from_uri($uri) { 105 109 $content = wp_remote_fopen($uri); … … 165 169 cache : false, 166 170 async : false, 167 data: "ajax=photo_images&u rl=<?php echo $url?>",171 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>", 168 172 dataType : "script" 169 173 }).responseText); … … 222 226 <?php die; } 223 227 224 // Clean up the data being passed in225 $title = wp_specialchars(stripslashes($_GET['t']));226 $selection = trim(wp_specialchars(str_replace("\n", ' ',stripslashes($_GET['s']))));227 $url = clean_url($_GET['u']);228 228 ?> 229 229 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … … 356 356 357 357 358 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s election: '<?php echo attribute_escape($selection); ?>'}, function() {358 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() { 359 359 360 360 <?php … … 388 388 389 389 jQuery('#extra_fields').show(); 390 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u rl='.attribute_escape($url); ?>');390 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>'); 391 391 jQuery('#extra_fields').prepend('<h2><img src="images/loading.gif" alt="" /> Loading...</h2>'); 392 392 jQuery.ajax({ … … 394 394 cache : false, 395 395 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>", 396 data: "ajax=photo_js&u rl=<?php echo $url?>",396 data: "ajax=photo_js&u=<?php echo urlencode($url)?>", 397 397 dataType : "script", 398 398 success : function() {
Note: See TracChangeset
for help on using the changeset viewer.