Skip to content

Commit

Permalink
Merge pull request #458 from stevepiercy/2.0-branch
Browse files Browse the repository at this point in the history
Backport #226
  • Loading branch information
stevepiercy authored Aug 23, 2020
2 parents d90eec6 + 60c79ed commit b2af702
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/widget.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ get defined as so:
if cstruct is null:
cstruct = u''
quoted = cgi.escape(cstruct, quote='"')
return u'<input type="text" value="%s">' % quoted
return ('<input type="text" name="%s" value="%s">' %
(field.name, quoted))
Note that every ``serialize`` method is responsible for returning a
serialization, no matter whether it is provided data by its caller or
Expand Down Expand Up @@ -451,7 +452,9 @@ attached.
def serialize(self, field, cstruct, readonly=False):
if cstruct is null:
cstruct = u''
return '<input type="text" value="%s">' % cgi.escape(cstruct)
quoted = cgi.escape(cstruct, quote='"')
return ('<input type="text" name="%s" value="%s">' %
(field.name, quoted))
def deserialize(self, field, pstruct):
if pstruct is null:
Expand Down Expand Up @@ -494,7 +497,9 @@ class:
def serialize(self, field, cstruct, readonly=False):
if cstruct is null:
cstruct = u''
return '<input type="text" value="%s">' % cgi.escape(cstruct)
quoted = cgi.escape(cstruct, quote='"')
return ('<input type="text" name="%s" value="%s">' %
(field.name, quoted))
def deserialize(self, field, pstruct):
if pstruct is null:
Expand Down

0 comments on commit b2af702

Please sign in to comment.