properly handle transferring evidence with special ao2 chars

This commit is contained in:
cidoku 2025-03-31 14:33:25 -03:00
parent e7daec78c7
commit 0659914127

View File

@ -2080,6 +2080,8 @@ class GUI(QtGui.QWidget):
return QtGui.QMessageBox.information(self, "Can't transfer evidence", 'The evidence "%s" already exists in the %s inventory.' % (evi[0], target_str)) return QtGui.QMessageBox.information(self, "Can't transfer evidence", 'The evidence "%s" already exists in the %s inventory.' % (evi[0], target_str))
else: else:
if self.privateinv: if self.privateinv:
for i in range(len(evi)):
evi[i] = evi[i].replace('#', '<num>').replace('%', '<percent>').replace('&', '<and>').replace('$', '<dollar>').replace('\\n', '\n')
self.tcp.send('PE#' + evi[0] + '#' + evi[1] + '#' + evi[2] + '#%') self.tcp.send('PE#' + evi[0] + '#' + evi[1] + '#' + evi[2] + '#%')
else: else:
self.privateevidence.append(evi) self.privateevidence.append(evi)