More esc_url when comparing results from autoembeds.
This commit is contained in:
parent
39c57ebd24
commit
9231341fd6
|
@ -330,7 +330,7 @@ class Media {
|
|||
|
||||
$embed = $wp_embed->autoembed($url);
|
||||
|
||||
if ( $embed == $url ) {
|
||||
if ( esc_url($embed) == esc_url($url) ) {
|
||||
$output .= sprintf("<a href='%s' target='blank'>%s</a>", $url, $url);
|
||||
} else {
|
||||
$output .= $embed;
|
||||
|
|
|
@ -760,7 +760,7 @@ class Item extends Entity {
|
|||
|
||||
$embed = $wp_embed->autoembed($url);
|
||||
|
||||
if ( $embed == $url ) {
|
||||
if ( esc_url($embed) == esc_url($url) ) {
|
||||
$output .= sprintf("<a href='%s' target='blank'>%s</a>", $url, $url);
|
||||
} else {
|
||||
$tainacan_embed = \Tainacan\Embed::get_instance();
|
||||
|
@ -796,7 +796,7 @@ class Item extends Entity {
|
|||
|
||||
$embed = $wp_embed->autoembed($url);
|
||||
|
||||
if ( $embed == $url ) {
|
||||
if ( esc_url($embed) == esc_url($url) ) {
|
||||
$output .= sprintf("<a href='%s' target='blank'>%s</a>", $url, $url);
|
||||
} else {
|
||||
$tainacan_embed = \Tainacan\Embed::get_instance();
|
||||
|
|
Loading…
Reference in New Issue