Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#5927 closed bug (notabug)

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:


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.

Change History (2)

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

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 so no change to the default is required.

comment:2 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.