Skip to content

Commit 5c735f4

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]> (cherry picked from commit b3fa0c4) Signed-off-by: Daniel Axtens <[email protected]>
1 parent 1a5aad5 commit 5c735f4

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
@@ -252,7 +252,7 @@ def _form(self):
252252
selected = ' selected="true"'
253253

254254
out += '<option value="%d" %s>%s</option>' % (
255-
state.id, selected, state.name)
255+
state.id, selected, escape(state.name))
256256
out += '</select>'
257257
return mark_safe(out)
258258

0 commit comments

Comments
 (0)