Combobox view: escape name string.

This commit is contained in:
Vikhyat Korrapati 2014-03-19 15:34:43 +05:30
parent 50ce93a850
commit 8163fcade7

View File

@ -42,7 +42,7 @@ Discourse.ComboboxView = Discourse.View.extend({
if (val) { val = val.toString(); }
var selectedText = (val === selected) ? "selected" : "";
buffer.push("<option " + selectedText + " value=\"" + val + "\" " + self.buildData(o) + ">" + Em.get(o, nameProperty) + "</option>");
buffer.push("<option " + selectedText + " value=\"" + val + "\" " + self.buildData(o) + ">" + Handlebars.Utils.escapeExpression(Em.get(o, nameProperty)) + "</option>");
});
}
},