title: Using HTML in jQuery UI autocomplete
body: <p>Before <a href="http://en.wikipedia.org/wiki/JQuery_UI" rel="noreferrer">jQuery UI</a> 1.8.4 I could use <a href="http://en.wikipedia.org/wiki/HTML" rel="noreferrer">HTML</a> in the JSON array I built to work with an autocomplete.</p>
  
  <p>I was able to do something like:</p>
  
  <pre><code>$row_array['label'] = '&lt;span style="color: red; font-family: courier;"&gt;User, Name&lt;/span&gt;';
  </code></pre>
  
  <p>That would show up as red text in the drop down.</p>
  
  <p>As of 1.8.4 that does not work. I found <a href="http://dev.jqueryui.com/ticket/5275" rel="noreferrer">http://dev.jqueryui.com/ticket/5275</a> which tells me to use the custom HTML example <a href="http://jqueryui.com/demos/autocomplete/#custom-data" rel="noreferrer">here</a> which I have had no luck with.</p>
  
  <p>How can I go about getting HTML to show up in the suggestion?</p>
  
  <p>My jQuery is:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function() {
          $("#findUserIdDisplay").autocomplete({
              source: "ui_autocomplete_users_withuname.php",
              minLength: 2,
              select: function(event, ui) {
                  $('#findUserId').val(ui.item.id);
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>My JSON array includes HTML like the following:</p>
  
  <pre><code>[{"label":"&lt;span style="color: red";&gt;User, Name&lt;/span&gt;","value":"User, Name","id":"10"}]
  </code></pre>