Skip to content

Commit 6774a89

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 95ccc2d commit 6774a89

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
@@ -254,7 +254,7 @@ def _form(self):
254254
selected = ' selected="true"'
255255

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

0 commit comments

Comments
 (0)