jQuery autocomplete special characters
<p>I have an ajax call which is fetching a JSON representation of a value created by a php json_encode method: </p>

<pre><code>["Montérégie","Montréal - North Shore ","Montréal - South Shore"]
</code></pre>

<p>The values are being harvested from a  'controller/ajax_autocomplete' by a  jquery autocomplete box. </p>

<pre><code>  $(function(){   $("#regions").autocomplete({               
            source: "controller/ajax_autocomplete",
            contentType: "application/json; charset=utf-8"
}                                                          
            });            
    }); 
</code></pre>

<p>All values are being corectly picked up by jQuery UI's ui-autocomplete but the special charaters are lost. 
<code>Montréal become Montr&amp;eacute;al, Montérégie   become Mont&amp;eacute;r&amp;eacute;gie</code> ... </p>

<p>The special characters are certainly destroyed during http transport because the problem goes away if I manualy copy the JSON table to jquery function.   </p>

<pre><code>    $(function(){   $("#regions").autocomplete({               
            contentType: "application/json; charset=utf-8",
            source: "["Montérégie","Montréal - North Shore ","Montréal - South Shore"]"
}                                                          
            });            
    }); 
</code></pre>

<p>Programmatically decoding the html entity works for text box value but the suggestion list still replaces the special characters with HTML entities</p>

<pre><code>$(function(){   $("#regions").autocomplete({              
        source: "controller/ajax_autocomplete",
        select: function( event, ui ) {
                event.preventDefault();
                this.value = $('&lt;div /&gt;').html(ui.item.value).text();
        }                                                                                                                                                                                            
        });            
});   
</code></pre>

<p>The solution would be to decode the HTML entities in suggestion list  </p>