hyperlink conversion to azw3 and display on kindle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I have the following html part:
<p>text to explain one<a href="#
<p>text to explain two<a href="#
<p><a name=id1><b>1. </b>explanation one</p>
<p><a name=id2><b>2. </b>explanation two</p>
If i convert this to azw3, the result is this:
<p class="
<p class="
<p class="calibre1"><a class="calibre2" id="id1" name="id1"><b class="calibre3">1. </b>explanation one</a></p><a class="calibre2" id="id1" name="id1">
</a><p class="calibre1"><a class="calibre2" id="id1" name="id1"></a><a class="calibre2" id="id2" name="id2"><b class="calibre3">2. </b>explanation two</a></p><a class="calibre2" id="id2" name="id2">
</a>
In the second segment you can see an extra <a class="calibre2" id="id1" name="id1"></a> , which confuse the Kindle4 reader. If i read the book in Calibre, and click on the first hyperlink, it's correctly jumping to the first target. However, if i am using the Kindle reader, it's jump to the second - wrong - target. If i convert same text to mobi, and open it on the Kindle4 reader, it works fine. If i remove this extra part from the code by the editing the book, and upload, it works fine.
If i have more hyperlinks in the text, it's become more messy, and the id's wondering around.
calibre version 2.27
Your HTML is malformed. Close the <a name> tags properly and you will be
fine. If you do not do that, they will be closed automatically, which
will lead to the situation you have.
status invalid