Skip to main content

Search and Top Navigation

#5927 closed bug (notabug)

Opened August 11, 2010 08:35PM UTC

Closed August 11, 2010 08:44PM UTC

Last modified October 11, 2012 09:15PM UTC

Autocomplete no longer renders HTML in the list with version 1.8.4

Reported by: dhopman Owned by:
Priority: minor Milestone:
Component: ui.autocomplete Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:
Description

Formatting the autocomplete dropdown list using HTML no longer works in version 1.8.4. This worked in version 1.8.2. It now shows the actual html elements in the list instead of the formatted output. Below is the code change that looks like what caused this problem.

1.8.2

return e("<li></li>").data("item.autocomplete",

c).append("<a>"+c.label+"</a>").appendTo(a)

1.8.4

return e("<li></li>").data("item.autocomplete",b).append(e("<a></a>").text(b.label)).appendTo(a)

It looks like the list output is now being escaped.

Attachments (0)
Change History (2)

Changed August 11, 2010 08:44PM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

This change is by design ( see #5275 ). As mentioned over there, "Defaulting to plaintext and defining your own render method for HTML and other complex displays makes sense."

An extension can provide a custom _renderItem, such as http://jqueryui.com/demos/autocomplete/custom-data.html so no change to the default is required.

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

milestone: TBD

Milestone TBD deleted