Ticket #32233: 32233.patch
File 32233.patch, 6.6 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/template.php
569 569 <table id="list-table" style="display: none;"> 570 570 <thead> 571 571 <tr> 572 <th class="left">' . _x( 'Name', 'meta name' ) . '</th>573 <th>' . __( 'Value' ) . '</th>572 <th class="left">' . esc_html_x( 'Name', 'meta name' ) . '</th> 573 <th>' . esc_html__( 'Value' ) . '</th> 574 574 </tr> 575 575 </thead> 576 576 <tbody id="the-list" data-wp-lists="list:meta"> … … 584 584 <table id="list-table"> 585 585 <thead> 586 586 <tr> 587 <th class="left"><?php _ex( 'Name', 'meta name' ) ?></th>588 <th><?php _e( 'Value' ) ?></th>587 <th class="left"><?php echo esc_html_x( 'Name', 'meta name' ) ?></th> 588 <th><?php esc_html_e( 'Value' ) ?></th> 589 589 </tr> 590 590 </thead> 591 591 <tbody id='the-list' data-wp-lists='list:meta'> … … 830 830 ksort( $templates ); 831 831 foreach ( array_keys( $templates ) as $template ) { 832 832 $selected = selected( $default, $templates[ $template ], false ); 833 echo "\n\t<option value='" . $templates[ $template ] . "' $selected>$template</option>";833 echo "\n\t<option value='" . esc_attr( $templates[ $template ] ) . "' $selected>" . esc_html( $template ) . "</option>"; 834 834 } 835 835 } 836 836 … … 921 921 <label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?>) 922 922 <input type="file" id="upload" name="import" size="25" /> 923 923 <input type="hidden" name="action" value="save" /> 924 <input type="hidden" name="max_file_size" value="<?php e cho $bytes; ?>" />924 <input type="hidden" name="max_file_size" value="<?php esc_attr_e( $bytes ); ?>" /> 925 925 </p> 926 926 <?php submit_button( __('Upload file and import'), 'button' ); ?> 927 927 </form> … … 1069 1069 echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . $hidden_class . '" ' . '>' . "\n"; 1070 1070 if ( 'dashboard_browser_nag' != $box['id'] ) 1071 1071 echo '<div class="handlediv" title="' . esc_attr__('Click to toggle') . '"><br /></div>'; 1072 echo "<h3 class='hndle'><span>{$box['title']}</span></h3>\n";1072 echo '<h3 class="hndle"><span>' . esc_html( $box['title'] ) . '</span></h3>' . "\n"; 1073 1073 echo '<div class="inside">' . "\n"; 1074 1074 call_user_func($box['callback'], $object, $box); 1075 1075 echo "</div>\n"; … … 1297 1297 1298 1298 foreach ( (array) $wp_settings_sections[$page] as $section ) { 1299 1299 if ( $section['title'] ) 1300 echo "<h3>{$section['title']}</h3>\n";1300 echo '<h3>' . esc_html( $section['title'] ) . '</h3>' . "\n"; 1301 1301 1302 1302 if ( $section['callback'] ) 1303 1303 call_user_func( $section['callback'], $section ); … … 1340 1340 echo "<tr{$class}>"; 1341 1341 1342 1342 if ( ! empty( $field['args']['label_for'] ) ) { 1343 echo '<th scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . $field['title']. '</label></th>';1343 echo '<th scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . esc_html( $field['title'] ) . '</label></th>'; 1344 1344 } else { 1345 echo '<th scope="row">' . $field['title']. '</th>';1345 echo '<th scope="row">' . esc_html( $field['title'] ) . '</th>'; 1346 1346 } 1347 1347 1348 1348 echo '<td>'; … … 1484 1484 $css_id = 'setting-error-' . $details['code']; 1485 1485 $css_class = $details['type'] . ' settings-error notice is-dismissible'; 1486 1486 $output .= "<div id='$css_id' class='$css_class'> \n"; 1487 $output .= "<p><strong>{$details['message']}</strong></p>";1487 $output .= '<p><strong>' . esc_html( $details['message'] ) . '</strong></p>'; 1488 1488 $output .= "</div> \n"; 1489 1489 } 1490 1490 echo $output; … … 1589 1589 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); 1590 1590 _wp_admin_html_begin(); 1591 1591 ?> 1592 <title><?php bloginfo('name') ?> › <?php echo $title?> — <?php _e('WordPress'); ?></title>1592 <title><?php bloginfo('name'); ?> › <?php esc_html_e( $title ); ?> — <?php _e('WordPress'); ?></title> 1593 1593 <?php 1594 1594 wp_enqueue_style( 'colors' ); 1595 1595 ?> … … 1598 1598 function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();} 1599 1599 var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', 1600 1600 pagenow = '<?php echo $current_screen->id; ?>', 1601 typenow = '<?php echo $current_screen->post_type; ?>',1602 adminpage = '<?php echo $admin_body_class; ?>',1601 typenow = <?php echo wp_json_encode( $current_screen->post_type ); ?>, 1602 adminpage = <?php echo wp_json_encode( $admin_body_class ); ?>, 1603 1603 thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>', 1604 1604 decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>', 1605 1605 isRtl = <?php echo (int) is_rtl(); ?>; … … 1637 1637 /** This filter is documented in wp-admin/admin-header.php */ 1638 1638 $admin_body_classes = apply_filters( 'admin_body_class', '' ); 1639 1639 ?> 1640 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">1640 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . esc_attr( $GLOBALS['body_id'] ) . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo esc_attr( $admin_body_classes ) . ' ' . esc_attr( $admin_body_class ); ?>"> 1641 1641 <script type="text/javascript"> 1642 1642 (function(){ 1643 1643 var c = document.body.className; … … 1719 1719 foreach ( $post_states as $state ) { 1720 1720 ++$i; 1721 1721 ( $i == $state_count ) ? $sep = '' : $sep = ', '; 1722 echo "<span class='post-state'>$state$sep</span>";1722 echo '<span class="post-state">' . esc_html( $state . $sep ) . '</span>'; 1723 1723 } 1724 1724 } 1725 1725 … … 1758 1758 foreach ( $media_states as $state ) { 1759 1759 ++$i; 1760 1760 ( $i == $state_count ) ? $sep = '' : $sep = ', '; 1761 echo "<span class='post-state'>$state$sep</span>";1761 echo '<span class="post-state">' . esc_html( $state . $sep ) . '</span>'; 1762 1762 } 1763 1763 } 1764 1764 } … … 2233 2233 echo '<span class="screen-reader-text">' . $title . '</span>'; 2234 2234 echo str_repeat( '<div class="star star-full"></div>', $full_stars ); 2235 2235 echo str_repeat( '<div class="star star-half"></div>', $half_stars ); 2236 echo str_repeat( '<div class="star star-empty"></div>', $empty_stars );2236 echo str_repeat( '<div class="star star-empty"></div>', $empty_stars ); 2237 2237 echo '</div>'; 2238 2238 } 2239 2239 … … 2244 2244 * @since 4.2.0 2245 2245 */ 2246 2246 function _wp_posts_page_notice() { 2247 echo '<div class="notice notice-warning inline"><p>' . __( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>';2247 echo '<div class="notice notice-warning inline"><p>' . esc_html__( 'You are currently editing the page that shows your latest posts.' ) . '</p></div>'; 2248 2248 }