Commit bf110d02 by Torkel Ödegaard

fix: form dropdown, escape autocomplete dropdown items, fixes #9089

parent e91cf28f
...@@ -115,7 +115,9 @@ export class FormDropdownCtrl { ...@@ -115,7 +115,9 @@ export class FormDropdownCtrl {
this.optionCache = options; this.optionCache = options;
// extract texts // extract texts
let optionTexts = _.map(options, 'text'); let optionTexts = _.map(options, op => {
return _.escape(op.text);
});
// add custom values // add custom values
if (this.allowCustom) { if (this.allowCustom) {
......
...@@ -29,7 +29,7 @@ function (_) { ...@@ -29,7 +29,7 @@ function (_) {
orderByOptions: [ orderByOptions: [
{text: "Doc Count", value: '_count' }, {text: "Doc Count", value: '_count' },
{text: "Term value", value: '_term' }, {text: "Term value<script>alert('hello')</script>", value: '_term' },
], ],
orderOptions: [ orderOptions: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment