Skip to content

<video> issue with </source> tags #9

Closed
@stevenle

Description

@stevenle

Looks like there's an issue when users use <source></source> and multiple <source> tags inside a

Input:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Video</title>
  </head>
  <body>
     <video src="ogg">
       <source class="webm" src="demo.webm" type="video/webm"></source>
       <source class="mp4" src="demo.mp4" type="video/mp4"></source>
     </video>
  </body>
</html>

Errors:

line 8 column 6 - Warning: replacing unexpected source by </source>
line 10 column 60 - Warning: discarding unexpected </source>
line 11 column 6 - Warning: discarding unexpected </video>
Info: Document content looks like HTML5
3 warnings, 0 errors were found!

Output: (notice the second <source> tag appears outside of the <video> tag)

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux from https://github.com/w3c/tidy-html5">
<meta charset="utf-8">
<title>Video</title>
</head>
<body>
<video src="ogg"><source class="webm" src="demo.webm" type=
"video/webm"></video> <source class="mp4" src="demo.mp4" type=
"video/mp4">
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions