From 63e2876f76ddfd5ee7f55c4d4d6c45873d0ae556 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 28 Nov 2009 17:34:30 -0500 Subject: [PATCH] PML Input: break if opening quote is not found when getting tag value. --- src/calibre/ebooks/pml/pmlconverter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/pml/pmlconverter.py b/src/calibre/ebooks/pml/pmlconverter.py index e6c352e2b5..cd5bafa260 100644 --- a/src/calibre/ebooks/pml/pmlconverter.py +++ b/src/calibre/ebooks/pml/pmlconverter.py @@ -375,10 +375,14 @@ class PML_HTMLizer(object): # than a space or = after the code then we can assume the # markup is invalid. We will stop looking for the value # and continue to hopefully not lose any data. - break; + break elif state == 1: if c == '"': state = 2 + elif c != ' ': + # " should always follow = but we will allow for blank + # space after the =. + break elif state == 2: if c == '"': state = 3