decode HTML entities before setting input value to autocomplete menu title

This commit is contained in:
rlx 2012-06-16 20:48:30 +00:00
parent 8f4e08063e
commit e9579e10eb

View file

@ -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({