aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-12-08 13:45:23 +0000
committerDave Arter <davea@mysociety.org>2016-12-08 13:45:23 +0000
commit68ed4f77d2e7561351ded8113dffc27a6ce94800 (patch)
tree0ef11ec6e9f8cbee982a49a392eda947067cf2da
parent7a78dc536468f8ed49b739ff69bd5e2ee26e64b0 (diff)
Filter category should always carry through to form
When filtering the map by a category containing spaces, this category wasn't being carried through to the dropdown on the new report form. Ensuring it's wrapped in quotes in the jQuery selector fixes the problem. Fixes mysociety/fixmystreetforcouncils#134
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index b6fed1591..1701c5cd0 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -946,7 +946,7 @@ fixmystreet.update_pin = function(lonlat, savePushState) {
// something from it, then pre-fill the category field in the report,
// if it's a value already present in the drop-down.
var category = $("#filter_categories").val();
- if (category !== undefined && $("#form_category option[value="+category+"]").length) {
+ if (category !== undefined && $("#form_category option[value='"+category+"']").length) {
$("#form_category").val(category);
}