1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 boolean syntax.

This commit is contained in:
Jon Dufresne
2016-09-21 15:12:13 -07:00
committed by GitHub
parent 42dc9d0400
commit 2c716c1dc7
18 changed files with 126 additions and 125 deletions

View File

@@ -544,7 +544,7 @@ class Select(Widget):
option_value = ''
option_value = force_text(option_value)
if option_value in selected_choices:
selected_html = mark_safe(' selected="selected"')
selected_html = mark_safe(' selected')
if not self.allow_multiple_selected:
# Only allow for a single selection.
selected_choices.remove(option_value)