Widgets: Escape RSS error messages for display.
Props xknown, timothyblynjacobs, matveb, talldanwp. Built from https://develop.svn.wordpress.org/trunk@54541 git-svn-id: http://core.svn.wordpress.org/trunk@54096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4396588167
commit
69b5015745
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-RC1-54530';
|
$wp_version = '6.1-RC1-54541';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -1578,7 +1578,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
|
||||||
|
|
||||||
if ( is_wp_error( $rss ) ) {
|
if ( is_wp_error( $rss ) ) {
|
||||||
if ( is_admin() || current_user_can( 'manage_options' ) ) {
|
if ( is_admin() || current_user_can( 'manage_options' ) ) {
|
||||||
echo '<p><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</p>';
|
echo '<p><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</p>';
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1701,7 +1701,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
|
||||||
$args['show_date'] = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date'];
|
$args['show_date'] = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date'];
|
||||||
|
|
||||||
if ( ! empty( $args['error'] ) ) {
|
if ( ! empty( $args['error'] ) ) {
|
||||||
echo '<p class="widget-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $args['error'] . '</p>';
|
echo '<p class="widget-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $args['error'] ) . '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$esc_number = esc_attr( $args['number'] );
|
$esc_number = esc_attr( $args['number'] );
|
||||||
|
|
Loading…
Reference in New Issue