Fix Menu widget bug.

This commit is contained in:
David Bau
2022-03-24 11:15:38 -04:00
parent dfe44ee99e
commit 7fab3e3f00
+2 -2
View File
@@ -829,8 +829,8 @@ class Menu(Widget):
with show.enter_tag(show.Tag('select', name='menu'), out=out):
for value in self.choices:
with show.enter_tag(show.Tag('option',
(show.attrs(selected=None) if value == self.selection else None),
value=value, out=out)):
(show.attr(selected=None) if value == self.selection else None),
value=value), out=out):
out.append(html.escape(str(value)))
return ''.join(out)