mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:33:42 +02:00
ODT Input: Dont crash on empty links
This commit is contained in:
parent
4f58d7b6c8
commit
e2d051cfc0
1 changed files with 1 additions and 1 deletions
|
|
@ -1158,7 +1158,7 @@ def s_text_a(self, tag, attrs):
|
|||
""" Anchors start """
|
||||
self.writedata()
|
||||
href = attrs[(XLINKNS,"href")].split("|")[0]
|
||||
if href[0] == "#":
|
||||
if href[:1] == "#": # Changed by Kovid
|
||||
href = "#" + self.get_anchor(href[1:])
|
||||
self.opentag('a', {'href':href})
|
||||
self.purgedata()
|
||||
|
|
|
|||
Loading…
Reference in a new issue