Skip to content

Commit 60c79ed

Browse files
committed
Update widget docs per #226 for consistency across code examples
(cherry picked from commit b7442ed)
1 parent 01af969 commit 60c79ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/widget.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,9 @@ attached.
452452
def serialize(self, field, cstruct, readonly=False):
453453
if cstruct is null:
454454
cstruct = u''
455+
quoted = cgi.escape(cstruct, quote='"')
455456
return ('<input type="text" name="%s" value="%s">' %
456-
(field.name, cgi.escape(cstruct, quote='"')))
457+
(field.name, quoted))
457458
458459
def deserialize(self, field, pstruct):
459460
if pstruct is null:
@@ -496,8 +497,9 @@ class:
496497
def serialize(self, field, cstruct, readonly=False):
497498
if cstruct is null:
498499
cstruct = u''
500+
quoted = cgi.escape(cstruct, quote='"')
499501
return ('<input type="text" name="%s" value="%s">' %
500-
(field.name, cgi.escape(cstruct, quote='"')))
502+
(field.name, quoted))
501503
502504
def deserialize(self, field, pstruct):
503505
if pstruct is null:

0 commit comments

Comments
 (0)