if "base64" in text or "BASE64" in text:
import StringIO
for line in StringIO.StringIO(text):
- if line.lower.startswith("content-transfer-encoding:") and \
+ if line.lower().startswith("content-transfer-encoding:") and \
"base64" in line.lower():
return text
return text + self.template("footer", {})