Data Validation fix

This commit is contained in:
Alexander Agnarson 2017-03-05 19:23:22 +01:00
parent 0134d75de8
commit fb742dea30
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ class AlxVideo extends WP_Widget {
// The widget
if ( !empty($instance['video_url']) ) {
global $wp_embed;
$video = $wp_embed->run_shortcode('[embed]'.$instance['video_url'].'[/embed]');
$video = $wp_embed->run_shortcode('[embed]'.esc_attr($instance['video_url']).'[/embed]');
}
else {
$video = '';

View file

@ -6,7 +6,7 @@
<?php
if ( isset($meta['_audio_url'][0]) && !empty($meta['_audio_url'][0]) ) {
global $wp_embed;
$audio = $wp_embed->run_shortcode('[embed]'.$meta['_audio_url'][0].'[/embed]');
$audio = $wp_embed->run_shortcode('[embed]'.esc_attr($meta['_audio_url'][0]).'[/embed]');
echo $audio;
}
?>
@ -82,7 +82,7 @@
<?php
if ( isset($meta['_video_url'][0]) && !empty($meta['_video_url'][0]) ) {
global $wp_embed;
$video = $wp_embed->run_shortcode('[embed]'.$meta['_video_url'][0].'[/embed]');
$video = $wp_embed->run_shortcode('[embed]'.esc_attr($meta['_video_url'][0]).'[/embed]');
echo $video;
}
?>