Remove style attribute in body because it may contain some inforamtion about the user
This commit is contained in:
parent
d2d656670c
commit
a3030c9e6b
|
@ -40,6 +40,7 @@ import subprocess
|
||||||
import datetime
|
import datetime
|
||||||
from helper_sql import *
|
from helper_sql import *
|
||||||
import base64
|
import base64
|
||||||
|
import re
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
@ -1857,7 +1858,9 @@ class MyForm(QtGui.QMainWindow):
|
||||||
fromAddress = str(self.ui.labelFrom.text())
|
fromAddress = str(self.ui.labelFrom.text())
|
||||||
subject = str(self.ui.lineEditSubject.text().toUtf8())
|
subject = str(self.ui.lineEditSubject.text().toUtf8())
|
||||||
message = str(
|
message = str(
|
||||||
self.ui.textEditMessage.document().toHtml().toUtf8())
|
self.ui.textEditMessage.document().toHtml("utf-8"))
|
||||||
|
# Remove style which may conatin some information about the user (ex. font='Ubuntu' on Ubuntu)
|
||||||
|
message=re.sub("<body style=\"[ a-zA-Z\\-\\:\\'\\;0-9]*\"","<body ",message)
|
||||||
if self.ui.radioButtonSpecific.isChecked(): # To send a message to specific people (rather than broadcast)
|
if self.ui.radioButtonSpecific.isChecked(): # To send a message to specific people (rather than broadcast)
|
||||||
toAddressesList = [s.strip()
|
toAddressesList = [s.strip()
|
||||||
for s in toAddresses.replace(',', ';').split(';')]
|
for s in toAddresses.replace(',', ';').split(';')]
|
||||||
|
|
Reference in New Issue
Block a user