Upgrader skins: Strip tags before displaying error data.

fixes #25394.

Built from https://develop.svn.wordpress.org/trunk@27737


git-svn-id: http://core.svn.wordpress.org/trunk@27574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-26 14:39:16 +00:00
parent 7213fe1518
commit 8c3925760f

View File

@ -65,7 +65,7 @@ class WP_Upgrader_Skin {
} elseif ( is_wp_error($errors) && $errors->get_error_code() ) {
foreach ( $errors->get_error_messages() as $message ) {
if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) )
$this->feedback($message . ' ' . esc_html( $errors->get_error_data() ) );
$this->feedback($message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
else
$this->feedback($message);
}
@ -217,7 +217,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
if ( is_wp_error($error) ) {
foreach ( $error->get_error_messages() as $emessage ) {
if ( $error->get_error_data() && is_string( $error->get_error_data() ) )
$messages[] = $emessage . ' ' . esc_html( $error->get_error_data() );
$messages[] = $emessage . ' ' . esc_html( strip_tags( $error->get_error_data() ) );
else
$messages[] = $emessage;
}