From 54faec35e46e6e621a924c1105917261989ef43b Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 1 Aug 2014 22:33:55 +0000 Subject: [PATCH] To improve troubleshooting use `esc_html()` for a failed embed. see #28195. git-svn-id: https://develop.svn.wordpress.org/trunk@29354 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 55661dd692..0e7394f5c8 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -2655,7 +2655,7 @@ function wp_ajax_parse_embed() { if ( ! $parsed ) { wp_send_json_error( array( 'type' => 'not-embeddable', - 'message' => sprintf( __( '%s failed to embed.' ), '' . esc_url( $url ) . '' ), + 'message' => sprintf( __( '%s failed to embed.' ), '' . esc_html( $url ) . '' ), ) ); } @@ -2685,7 +2685,7 @@ function wp_ajax_parse_embed() { // Admin is ssl and the embed is not. Iframes, scripts, and other "active content" will be blocked. wp_send_json_error( array( 'type' => 'not-ssl', - 'message' => sprintf( __( 'Preview not available. %s cannot be embedded securely.' ), '' . esc_url( $url ) . '' ), + 'message' => sprintf( __( 'Preview not available. %s cannot be embedded securely.' ), '' . esc_html( $url ) . '' ), ) ); } @@ -2723,4 +2723,4 @@ function wp_ajax_parse_media_shortcode() { } wp_send_json_success( ob_get_clean() ); -} \ No newline at end of file +}