Skip to content

Commit

Permalink
Update widget docs per #226 for consistency across code examples
Browse files Browse the repository at this point in the history
(cherry picked from commit b7442ed)
  • Loading branch information
stevepiercy committed Aug 23, 2020
1 parent 01af969 commit 60c79ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/widget.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ attached.
def serialize(self, field, cstruct, readonly=False):
if cstruct is null:
cstruct = u''
quoted = cgi.escape(cstruct, quote='"')
return ('<input type="text" name="%s" value="%s">' %
(field.name, cgi.escape(cstruct, quote='"')))
(field.name, quoted))
def deserialize(self, field, pstruct):
if pstruct is null:
Expand Down Expand Up @@ -496,8 +497,9 @@ class:
def serialize(self, field, cstruct, readonly=False):
if cstruct is null:
cstruct = u''
quoted = cgi.escape(cstruct, quote='"')
return ('<input type="text" name="%s" value="%s">' %
(field.name, cgi.escape(cstruct, quote='"')))
(field.name, quoted))
def deserialize(self, field, pstruct):
if pstruct is null:
Expand Down

0 comments on commit 60c79ed

Please sign in to comment.