From 1fa8c4c535fba163152437b2bb426086db106009 Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 15 Jul 2013 11:10:19 +0200 Subject: [PATCH] Remove cleanXML() This function is way too strong, and no longer needed (even for the targeted feed). It lead to other bugs with other feeds, where needed spaces were stripped. --- morss.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/morss.py b/morss.py index 9590209..7ac7010 100644 --- a/morss.py +++ b/morss.py @@ -65,9 +65,6 @@ def log(txt): with open('morss.log', 'a') as file: file.write(repr(txt).encode('utf-8') + "\n") -def cleanXML(xml): - table = string.maketrans('', '') - return xml.translate(table, table[:32]).lstrip() def lenHTML(txt): if len(txt): @@ -329,7 +326,6 @@ def Gather(url, cachePath, mode='feed'): except (urllib2.HTTPError, urllib2.URLError): return False - xml = cleanXML(xml) rss = feeds.parse(xml) size = len(rss)