mirror of
git://develop.git.wordpress.org/
synced 2025-04-12 16:15:07 +02:00
Widgets: Escape RSS error messages for display.
Props xknown, timothyblynjacobs, matveb, talldanwp. Merges [54541] to the 6.0 branch. git-svn-id: https://develop.svn.wordpress.org/branches/6.0@54542 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
49660ae677
commit
a058ffd9b8
@ -1578,7 +1578,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
|
||||
|
||||
if ( is_wp_error( $rss ) ) {
|
||||
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;
|
||||
}
|
||||
@ -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'];
|
||||
|
||||
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'] );
|
||||
|
Loading…
x
Reference in New Issue
Block a user