Spreadsheet: Fix to prevent unwanted characters in spreadsheet cells

This commit is contained in:
Yorik van Havre 2014-07-06 18:50:40 -03:00
parent 3d87d88616
commit 1be778a53d

View File

@ -617,6 +617,11 @@ class SpreadsheetController:
if hasattr(value,arg):
value = getattr(value,arg)
try:
if isinstance(value,float) or isinstance(value,int):
pass
else:
value = str(value)
value = ''.join([ c for c in value if c not in ('<','>',':')])
setattr(spreadsheet.Proxy,cell,value)
if DEBUG: print "setting cell ",cell," to value ",value
except: