#
# Fixes by EST, 25 April 2003
#
-# Merge Lennart Poettering's fix for Debian bug 139714.
-# Merged an amended version of Jeron Jeroen N. Witmond's
-# fix for Debian bug 168964.
+# Merged amended versions of Lennart Poettering's fix for Debian bug 139714.
+# and Jeroen N. Witmond's fix for Debian bug 168964. Added regression-test
+# production.
import sys, os, getopt, string, re, urllib, commands
import filecmp
cmp = filecmp
del filecmp
-# Modified by Lennnart Poettering <mz696d6773697a6572@poettering.de> Mar 24 2002
-#
-# Fixed a typo and corrected imgsizer for being able to cope with
-# single-char html tags just before an <img>-tag.
-#
except ImportError:
import cmp
outfp.write(ch)
if ch == '<':
# within an HTML tag
- lead = infp.read(3)
- if ch == '':
- return
+ lead = infp.read(2)
outfp.write(lead)
- if string.find(lead, '>') > -1:
+ if not lead in ("im", "IM"):
continue
+ # splitting the read this way copes with single-char tags like <b>
+ lead = lead + infp.read(1)
+ outfp.write(lead[-1])
if not lead in ("img", "IMG"):
continue
# within an image tag