WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/16/2012 09:55:47 PM (6 years ago)
Author:
nacin
Message:

Escape special characters when outputting DB failures. see #13839.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r20292 r20483  
    755755<li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>
    756756</ul>
    757 <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), $db, $this->dbuser ), 'db_select_fail' );
     757<p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' );
    758758            return;
    759759        }
     
    10521052</ul>
    10531053<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
    1054 " ), $this->dbhost ), 'db_connect_fail' );
     1054" ), htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' );
    10551055
    10561056            return;
Note: See TracChangeset for help on using the changeset viewer.