More esc_url when comparing results from autoembeds.

This commit is contained in:
mateuswetah 2022-06-24 09:24:41 -03:00
parent 39c57ebd24
commit 9231341fd6
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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();