Skip to content

Commit b3fa0c4

Browse files
ajdlinuxdaxtens
authored andcommitted
filters: Escape State names when generating selector HTML
States with names containing special characters are not correctly escaped when generating the select list. Use escape() to fix this. Signed-off-by: Andrew Donnellan <[email protected]>
1 parent df80e69 commit b3fa0c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

patchwork/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def form(self):
262262
selected = ' selected="true"'
263263

264264
out += '<option value="%d" %s>%s</option>' % (
265-
state.id, selected, state.name)
265+
state.id, selected, escape(state.name))
266266
out += '</select>'
267267
return mark_safe(out)
268268

0 commit comments

Comments
 (0)