Make WordPress Core

Ticket #21523: 21523.2.patch

File 21523.2.patch, 4.2 KB (added by gtuk, 9 years ago)
  • trunk/src/wp-admin/credits.php

     
    6969 * @param string &$data External library data, passed by reference.
    7070 */
    7171function _wp_credits_build_object_link( &$data ) {
    72         $data = '<a href="' . esc_url( $data[1] ) . '">' . $data[0] . '</a>';
     72        $data = '<a href="' . esc_url( $data[1] ) . '">' . esc_html( $data[0] ) . '</a>';
    7373}
    7474
    7575list( $display_version ) = explode( '-', $wp_version );
     
    7878?>
    7979<div class="wrap about-wrap">
    8080
    81 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
     81<h1><?php printf( __( 'Welcome to WordPress %s' ), esc_html( $display_version ) ); ?></h1>
    8282
    83 <div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s helps you communicate and share, globally.' ), $display_version ); ?></div>
     83<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s helps you communicate and share, globally.' ), esc_html( $display_version ) ); ?></div>
    8484
    85 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
     85<div class="wp-badge"><?php printf( __( 'Version %s' ), esc_html( $display_version ) ); ?></div>
    8686
    8787<h2 class="nav-tab-wrapper">
    8888        <a href="about.php" class="nav-tab">
     
    9999$credits = wp_credits();
    100100
    101101if ( ! $credits ) {
    102         echo '<p class="about-description">' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
     102        echo '<p class="about-description">' . esc_html( sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
    103103                'https://wordpress.org/about/',
    104104                /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
    105                 __( 'https://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
     105                __( 'https://codex.wordpress.org/Contributing_to_WordPress' ) ) ) . '</p>';
    106106        include( ABSPATH . 'wp-admin/admin-footer.php' );
    107107        exit;
    108108}
     
    122122                        $title = translate( $group_data['name'] );
    123123                }
    124124
    125                 echo '<h4 class="wp-people-group">' . $title . "</h4>\n";
     125                echo '<h4 class="wp-people-group">' . esc_html( $title ) . "</h4>\n";
    126126        }
    127127
    128128        if ( ! empty( $group_data['shuffle'] ) )
     
    139139                        break;
    140140                default:
    141141                        $compact = 'compact' == $group_data['type'];
    142                         $classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
     142                        $classes = esc_attr( 'wp-people-group ' . ( $compact ? 'compact' : '' ) );
    143143                        echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
    144144                        foreach ( $group_data['data'] as $person_data ) {
    145                                 echo '<li class="wp-person" id="wp-person-' . $person_data[2] . '">' . "\n\t";
    146                                 echo '<a href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">';
     145                                echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
     146                                echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '">';
    147147                                $size = 'compact' == $group_data['type'] ? '30' : '60';
    148                                 echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" srcset="' . $gravatar . $person_data[1] . '?s=' . $size * 2 . ' 2x" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
    149                                 echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
     148                                echo '<img src="' . esc_url( $gravatar . $person_data[1] . '?s=' . $size . '" srcset="' . $gravatar . $person_data[1] . '?s=' . $size * 2 ) . ' 2x" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
     149                                echo '<a class="web" href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '">' . esc_html( $person_data[0] ) . "</a>\n\t";
    150150                                if ( ! $compact )
    151                                         echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
     151                                        echo '<span class="title">' . esc_html( translate( $person_data[3] ) ) . "</span>\n";
    152152                                echo "</li>\n";
    153153                        }
    154154                        echo "</ul>\n";