From e2d051cfc0a89566480b02f5a0578a314d4945b1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Jan 2012 15:37:25 +0530 Subject: [PATCH] ODT Input: Dont crash on empty links --- src/odf/odf2xhtml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odf/odf2xhtml.py b/src/odf/odf2xhtml.py index b1dbebb775..df7ce0bc8d 100644 --- a/src/odf/odf2xhtml.py +++ b/src/odf/odf2xhtml.py @@ -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()