Comments (2)
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.
from tidy-html5.
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>
from tidy-html5.
Related Issues (20)
- tidy 5.8.0 reports version as 5.7.45 HOT 1
- Request.info
- Misleading warning for minlength attributes on input elements
- tidy-html5 Build failure on arm64-uwp
- "This document has errors" message gets "stuck" after hitting first error, when scanning multiple files
- nowrap and width attributes in <td> tag
- Stack-overflow on tidy-html5-5.8.0 HOT 2
- accessibility-check disables tidy-mark
- option "--indent-with-tabs yes" does NOT work as expected HOT 1
- can -i be performed without adding elements?
- Document --tidy-mark flag in tidy --help HOT 2
- Your website - Use HTML tidy perhaps? HOT 2
- embedded javascript is not being indented, nor is existing indentation preserved
- Display of options in help is not handling multibyte characters
- Always direct the user to the line where the crime occurred
- Warn about empty tags
- Say instead "`<` seen twice"
- 放送部ファイル
- مرحبا
- Hi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.