From e9579e10ebaf06895a9b5f688b1d91d0d92a9adc Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sat, 16 Jun 2012 20:48:30 +0000 Subject: [PATCH] decode HTML entities before setting input value to autocomplete menu title --- source/Ox.UI/js/Form/Input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Form/Input.js b/source/Ox.UI/js/Form/Input.js index a641be72..827c08ae 100644 --- a/source/Ox.UI/js/Form/Input.js +++ b/source/Ox.UI/js/Form/Input.js @@ -443,8 +443,8 @@ Ox.Input = function(options, self) { }).map(function(v) { return { id: v.toLowerCase().replace(/ /g, '_'), // fixme: need function to do lowercase, underscores etc? - title: self.options.autocompleteSelectHighlight ? - Ox.highlight(v, value, 'OxHighlight') : v + title: self.options.autocompleteSelectHighlight + ? Ox.highlight(v, value, 'OxHighlight') : v }; }) }); @@ -834,7 +834,7 @@ Ox.Input = function(options, self) { var pos = cursor(); //if (self.options.value) { //Ox.Log('Form', 'selectMenu', pos, data.title) - self.options.value = data.title + self.options.value = Ox.decodeHTMLEntities(data.title); self.$input.val(self.options.value); cursor(pos[0], self.options.value.length); self.options.changeOnKeypress && that.triggerEvent({