Skip to main content

Search and Top Navigation

#6007 closed bug (notabug)

Opened August 31, 2010 04:02AM UTC

Closed August 31, 2010 12:25PM UTC

Last modified October 11, 2012 09:15PM UTC

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.

Attachments (0)
Change History (3)

Changed August 31, 2010 12:25PM UTC by scottgonzalez comment:1

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.

Changed August 31, 2010 06:07PM UTC by shahraship comment:2

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?

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted