Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#32807 closed defect (bug) (invalid)

<audio><video>tags not closed properly

Reported by: patilswapnilv's profile patilswapnilv Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords:
Focuses: Cc:

Description (last modified by dd32)

The <audio> and <video> tags are not closed properly in the media-template.php file in wp-includes.

line no. 19, 811 and 91

<audio style="visibility: hidden"
	controls
	class="wp-audio-shortcode"
	width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
	preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}"
	<#
	<?php foreach ( array( 'autoplay', 'loop' ) as $attr ):
	?>if ( ! _.isUndefined( data.model.<?php echo $attr ?> ) && data.model.<?php echo $attr ?> ) {
		#> <?php echo $attr ?><#
	}
	<?php endforeach ?>#>
>
	<# if ( ! _.isEmpty( data.model.src ) ) { #>
	<source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
	<# } #>

	<?php foreach ( $audio_types as $type ):
	?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) { #>
	<source src="{{ data.model.<?php echo $type ?> }}" type="{{ wp.media.view.settings.embedMimes[ '<?php echo $type ?>' ] }}" />
	<# } #>
	<?php endforeach;
?></audio>

though the tag is closed later on line 43, I think that is not the correct way.

Change History (4)

#1 @dd32
9 years ago

  • Description modified (diff)
  • Keywords reporter-feedback added

Link to source: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/media-template.php#L16

Hi @patilswapnilv, can you explain what the actual problem is here? The tags appear to be closed correctly. Note: The <source> tags must be within the <audio>...</audio> tags.

#2 @chriscct7
9 years ago

  • Component changed from General to Media
  • Version changed from trunk to 3.9

#3 @patilswapnilv
9 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I am really sorry, I just missed the closing tag on the line no. 30.

Last edited 9 years ago by patilswapnilv (previous) (diff)

#4 @miqrogroove
9 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.