Commit 05f17863 authored by Cage, Marshall Andrew's avatar Cage, Marshall Andrew
Browse files

Improve whitespace removal in email dump (bandaid #1)

parent 4993fcf0
...@@ -489,6 +489,7 @@ class ARCTool(QMainWindow): ...@@ -489,6 +489,7 @@ class ARCTool(QMainWindow):
file.write(data) file.write(data)
self.setIsSaved(True) self.setIsSaved(True)
self.updateTitle() self.updateTitle()
self.ui.statusBar.showMessage("Saved Profile as %s" %name)
return 0 return 0
def updateTitle(self): def updateTitle(self):
......
...@@ -480,11 +480,13 @@ class Plugin(arcclasses.Plugin): ...@@ -480,11 +480,13 @@ class Plugin(arcclasses.Plugin):
text = re.sub('\xa0',' ',text) text = re.sub('\xa0',' ',text)
text = re.sub(' +',' ',text) text = re.sub(' +',' ',text)
# Collapse Breaks # Collapse Breaks/Paragraphs/Spans/Divs
text = re.sub(r'(?s)<br>\s*(?:</br>)?','<br/>',text) text = re.sub(r'(?s)<br>\s*(?:</br>)?','<br/>',text)
text = re.sub(r'(?s)(?<=>)\s*<br\s*/?>\s*(?=<)', '',text) text = re.sub(r'(?s)(?<=>)\s*<br\s*/?>\s*(?=<)', '',text)
text = re.sub(r'(?s)\s*<span( [^>]+)?>\s*</span>\s*','',text)
text = re.sub(r'(?s)\s*<p( [^>]+)?>\s*</p>\s*','',text) text = re.sub(r'(?s)\s*<p( [^>]+)?>\s*</p>\s*','',text)
text = re.sub(r'(?s)\s*<span( [^>]+)?>\s*</span>\s*','',text)
text = re.sub(r'(?s)\s*<div( [^>]+)?>\s*</div>\s*','',text)
text = re.sub(r'(?s)(?<=>)\s*<br\s*/?>\s*(?=<)', '',text) #bandaid
return text return text
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment