-
Notifications
You must be signed in to change notification settings - Fork 429
<video> issue with </source> tags #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is expected behavior because Also you example is invalid because you can't have both the src attribute on video and also a source child. Need to be one or other but not both. |
I was thinking that even though the markup isn't valid, tidy would automatically try to fix it for the user. The warning messages ("Warning: replacing unexpected source by </source>" and "line 10 column 44 - Warning: discarding unexpected </source>"), seems to indicate it's trying but failing. Even when I use the example from w3schools but insert invalid closing tags, this behavior appears: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video</title>
</head>
<body>
<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4"></source>
<source src="movie.ogg" type="video/ogg"></source>
Your browser does not support the video tag.
</video>
</body>
</html> Gets tided to: <!DOCTYPE html>
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 (experimental) for Linux https://github.com/w3c/tidy-html5/tree/f2825b9">
<meta charset="utf-8">
<title>Video</title>
</head>
<body>
<video width="320" height="240" controls="controls"><source src=
"movie.mp4" type="video/mp4"></video> <source src="movie.ogg" type=
"video/ogg"> Your browser does not support the video tag.
</body>
</html> |
Looks like there's an issue when users use <source></source> and multiple <source> tags inside a
Input:
Errors:
Output: (notice the second <source> tag appears outside of the <video> tag)
The text was updated successfully, but these errors were encountered: