A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
1.8k
stars
467
forks
source link
Using data-html has no effect when rendering new option #1219
Closed
eprikazc closed 3 years ago
data-html=true
for your select2 widgetProblem: HTML is not interpreted but displayed as text:
This seem to be related to https://github.com/yourlabs/django-autocomplete-light/issues/1171. Looks like its fix was not quite correct. As I understand, the problem happens because of
$('<span>').text(...)
call here - https://github.com/yourlabs/django-autocomplete-light/blob/3.8.1/src/dal_select2/static/autocomplete_light/select2.js#L28 Ifdata-html
is set we want to do$(<span>).html
, not$(<span>).text()