Browse Source

Update model to escape multiline inputs

pull/167/head
chriskiehl 8 years ago
parent
commit
f90905b4c0
1 changed files with 5 additions and 5 deletions
  1. 10
      gooey/gui/model.py

10
gooey/gui/model.py

@ -37,11 +37,11 @@ class MyWidget(object):
if self.commands and value:
return u'{} {}'.format(self.commands[0], value)
return value or None
# if self.type == 'TextField':
# if self.commands and self._value:
# return '{} {}'.format(self.commands[0], quote(self._value))
# else:
# return quote(self._value) if self._value else ''
if self.type == 'Textarea':
if self.commands and self._value:
return '{} {}'.format(self.commands[0], quote(self._value.encode('unicode_escape')))
else:
return quote(self._value.encode('unicode_escape')) if self._value else ''
if self.type == 'CommandField':
if self.commands and self._value:
return u'{} {}'.format(self.commands[0], self._value)

Loading…
Cancel
Save