summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Donnellan <ajd@linux.ibm.com>2019-07-05 13:27:41 +1000
committerDaniel Axtens <dja@axtens.net>2019-07-05 14:50:21 +1000
commitb3fa0c402e060622a5ed539a465d2fa98b1d2e13 (patch)
tree8f3790738f2e99aff427f148d11bbc052395fab2
parentdf80e690bcc32d483875dcb36b488764c89ec9b6 (diff)
downloadpatchwork-b3fa0c402e060622a5ed539a465d2fa98b1d2e13.tar
patchwork-b3fa0c402e060622a5ed539a465d2fa98b1d2e13.tar.gz
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 <ajd@linux.ibm.com>
-rw-r--r--patchwork/filters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/filters.py b/patchwork/filters.py
index e2d2f59..fb644f9 100644
--- a/patchwork/filters.py
+++ b/patchwork/filters.py
@@ -262,7 +262,7 @@ class StateFilter(Filter):
selected = ' selected="true"'
out += '<option value="%d" %s>%s</option>' % (
- state.id, selected, state.name)
+ state.id, selected, escape(state.name))
out += '</select>'
return mark_safe(out)