Skip to content
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

tidy creates non-tidy empty <title> tag #1122

Open
petdance opened this issue Aug 11, 2024 · 0 comments
Open

tidy creates non-tidy empty <title> tag #1122

petdance opened this issue Aug 11, 2024 · 0 comments

Comments

@petdance
Copy link
Contributor

Tidy creates a <title> tag when one is missing, but it's empty and that's not tidy.

$ cat bad.html
<a href="http://www.example.com/"><em>This is a test.
$ tidy -o good.html -f errors.txt bad.html
$ cat good.html
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Apple macOS version 5.8.0">
<title></title>
</head>
<body>
<a href="http://www.example.com/"><em>This is a test.</em></a>
</body>
</html>
$ tidy -e -q good.html
line 6 column 1 - Warning: blank 'title' element

I discovered this because I am updating the HTML::Tidy5 Perl module and one of the automated tests I have is that the cleaned HTML that comes back is itself clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant