Ticket #5422: 5422.patch
| File 5422.patch, 1.9 KB (added by Viper007Bond, 5 years ago) |
|---|
-
wp-admin/includes/update.php
14 14 break; 15 15 16 16 case 'upgrade' : 17 return sprintf( '| <strong>'.__( 'Your WordPress %s is out of date. <a href="%s">Please update</a>.' ).'</strong>', $GLOBALS['wp_version'], $cur->url);17 return sprintf( '| <strong>'.__( 'Your WordPress %s is out of date. <a href="%s">Please update</a>.' ).'</strong>', $GLOBALS['wp_version'], htmlspecialchars( $cur->url, ENT_QUOTES ) ); 18 18 break; 19 19 20 20 case 'latest' : … … 32 32 return false; 33 33 34 34 if ( current_user_can('manage_options') ) 35 $msg = sprintf( __('A new version of WordPress is available! <a href="%s">Please update now</a>.'), $cur->url);35 $msg = sprintf( __('A new version of WordPress is available! <a href="%s">Please update now</a>.'), htmlspecialchars( $cur->url, ENT_QUOTES ) ); 36 36 else 37 37 $msg = __('A new version of WordPress is available! Please notify the site administrator.'); 38 38 … … 113 113 114 114 $r = $current->response[ $file ]; 115 115 116 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); 117 116 118 echo "<tr><td colspan='5' class='plugin-update'>"; 117 printf( __('There is a new version of %s available. <a href="%s">Download version %s here</a>.'), $plugin_data['Name'], $r->url, $r->new_version ); 119 120 printf( 121 __('There is a new version of %s available. <a href="%s">Download version %s here</a>.'), 122 wp_kses( $plugin_data['Name'], $plugins_allowedtags ), 123 htmlspecialchars( $r->url, ENT_QUOTES ), 124 htmlspecialchars( wp_kses( $r->new_version, $plugins_allowedtags ) ) 125 ); 126 118 127 echo "</td></tr>"; 119 128 } 120 129 add_action( 'after_plugin_row', 'wp_plugin_update_row' );
