Reputation: 317
Have a look here:
Does anyone have a quick and simple fix for this?
Basically the html escape characters are being added in the input field if the user arrows up, or down.
Upvotes: 0
Views: 1004
Reputation: 317
Fixed!
With the help of some googling and another S.O. Question; under the "focus" object, I added this:
$( ".project" ).val( ui.item.label );
function decode(input){
return $('<div/>').html(input).text();
}
$(function(){
$('.project').keydown(function(){
$($(this)).val(decode($($(this)).val()));
});
});
Hopefully this helps anyone else that runs into this problem!
Tested in IE 7,8,9 FF, Chrome and Safari.
Upvotes: 0
Reputation: 2185
In your projects
array, you have unicode character references. If your website is encoded as UTF-8, this may not be necessary.
See here: http://jsfiddle.net/zK3Wc/28/
Upvotes: 1