Open
Description
I'm forwarding some longstanding downstream issues here, one of which is about empty list. Previous reports:
Tidy transforms some valid XHTML file into an invalid one.
For instance, the source has:
<ul class="ul"><li class="li"></li></ul>
which is valid. Tidy removes the empty li, but not the ul (this
doesn't happen if one removes the class attribute), so that one
gets:
<ul class="ul"></ul>
which is invalid (there must be at least one li).
Sample test case:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- $Id: tidy-empty-list.html 43963 2011-05-26 12:08:28Z vinc17/ypig $ -->
<head>
<title>Test of tidy on an empty list</title>
</head>
<body>
<p>Debian's <cite>Tidy</cite> 20091223cvs-1 transforms this valid XHTML
file into an invalid one: it removes the empty <samp>li</samp> but keeps
the <samp>ul</samp> element due to its <samp>class</samp> attribute!</p>
<ul class="ul"><li class="li"></li></ul>
</body>
</html>