Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#6007 closed bug (notabug)

autocomplete doesn't html

Reported by: shahraship Owned by:
Priority: major Milestone:
Component: ui.autocomplete Version: 1.8.4
Keywords: autocomplete Cc:
Blocked by: Blocking:

Description

I just updated jqueryui to 1.8.4 and I return JSON data back as a result. My label contains HTML however, autocomplete doesn't parse html properly. It just displays HTML as string. It wasn't the case in 1.8.2 For example my result json string is : [{"id":"1", "value":"Test User", "label":"<img src=\"\/images\/icon-female.gif\" alt=\"Test User Image\" width=\"30\" height=\"30\" align=\"left\" \/> Test User<br \/><i>NEW YORK, NY<\/i>"}]

Instead of parsing the HTML it shows the HTML text in the list. In 1.8.2, the HTML is properly rendered.

Change History (3)

comment:1 Changed 9 years ago by Scott González

Component: ui.coreui.autocomplete
Resolution: invalid
Status: newclosed

This was an intentional change and is mentioned in the 1.8.4 changelog. There's an extension to add support for HTML labels.

comment:2 Changed 9 years ago by shahraship

I tried this as mentioned in the documentation:

$("#q").autocomplete({source: [{"id":"1", "value":"Test User", "label":"<img src=\"\/images\/icon-female.gif\" alt=\"Test User Image\" width=\"30\" height=\"30\" align=\"left\" \/> Test User<br \/><i>NEW YORK, NY<\/i>"}], html: true});

It still doesn't render HTML properly, am I doing wrong?

comment:3 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.