incorrect class substitution in html

Bug #1274339 reported by ivo welch on 2014-01-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

in the validated html5 document below, for some reason, calibre 1.0 rewrites the class for the second table to be the same as the class for the first table in the html in the converted epub document. not surprisingly, this means it is misrendered. I know now how to avoid this bug. but I think this is a bug...

<!DOCTYPE html>
<html>
  <head>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
   <title>calibre html bug</title>
</head>

<body>

<div class="table">

<style scoped>
  table.lrr tr td:nth-child(1) { text-align: left; }
  table.lrr tr td:nth-child(2) { text-align: right; }
  table.lrr tr td:nth-child(3) { text-align: right; }
</style>

<table class="lrr">
<tr> <td> Row </td><td> &ndash;0.257 </td><td> 0.128</td> </tr>
</table>

</div>

<div class="table">

<style scoped>
  table.lrrrr tr td:nth-child(1) { text-align: left; }
  table.lrrrr tr td:nth-child(2) { text-align: right; }
  table.lrrrr tr td:nth-child(3) { text-align: right; }
  table.lrrrr tr td:nth-child(4) { text-align: right; }
  table.lrrrr tr td:nth-child(5) { text-align: right; }
</style>

<table class="lrrrr">
<tr> <td> </td><td>okrightalignment</td><td>okrightalignment</td><td>badalignment</td><td>badalignment</td></tr>
<tr> <td>Row </td><td>0.294</td><td>0.282</td><td>0.337</td><td>0.329</td> </tr>
</table>

</div>

</body>
</html>

ivo welch (ivo-welch) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments