Make WordPress Core

Ticket #50572: 50572.1.diff

File 50572.1.diff, 1.6 KB (added by sabernhardt, 4 years ago)

removes uppercase, adds code class, escapes HTML consistently

  • src/wp-admin/network/site-settings.php

     
    146146                        if ( strpos( $option->option_value, "\n" ) !== false ) {
    147147                                ?>
    148148                                <tr class="form-field">
    149                                         <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo ucwords( str_replace( '_', ' ', $option->option_name ) ); ?></label></th>
     149                                        <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>" class="code"><?php echo esc_html( $option->option_name ); ?></label></th>
    150150                                        <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ); ?>]" id="<?php echo esc_attr( $option->option_name ); ?>"<?php disabled( $disabled ); ?>><?php echo esc_textarea( $option->option_value ); ?></textarea></td>
    151151                                </tr>
    152152                                <?php
     
    153153                        } else {
    154154                                ?>
    155155                                <tr class="form-field">
    156                                         <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo esc_html( ucwords( str_replace( '_', ' ', $option->option_name ) ) ); ?></label></th>
     156                                        <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>" class="code"><?php echo esc_html( $option->option_name ); ?></label></th>
    157157                                        <?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ), true ) ) { ?>
    158158                                        <td><code><?php echo esc_html( $option->option_value ); ?></code></td>
    159159                                        <?php } else { ?>