mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
ODT Input: Dont crash on empty links
This commit is contained in:
parent
4f58d7b6c8
commit
e2d051cfc0
@ -1158,7 +1158,7 @@ ol, ul { padding-left: 2em; }
|
||||
""" 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…
x
Reference in New Issue
Block a user