Make WordPress Core

Changeset 42672


Ignore:
Timestamp:
02/08/2018 10:57:28 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Avoid extra line breaks in a textarea in wp-admin/setup-config.php.

See #43252.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/setup-config.php

    r42343 r42672  
    399399    /* translators: %s: wp-config.php */
    400400    printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
     401
     402    $config_text = '';
     403
     404    foreach ( $config_file as $line ) {
     405        $config_text .= htmlentities( $line, ENT_COMPAT, 'UTF-8' );
     406    }
    401407?>
    402408</p>
    403 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly">
    404 <?php
    405 foreach ( $config_file as $line ) {
    406     echo htmlentities( $line, ENT_COMPAT, 'UTF-8' );
    407 }
    408 ?>
    409 </textarea>
     409<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea>
    410410<p><?php _e( 'After you&#8217;ve done that, click &#8220;Run the installation.&#8221;' ); ?></p>
    411411<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p>
Note: See TracChangeset for help on using the changeset viewer.