ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Autocomplete show HTML entities on selection
Title:
B
I
{code}
?
I'm using the Autocomplete control and the datasource I'm using has strings containing accented characters, such as 'é'. In the autocomplete popup list, it shows fine, but when I select an option, instead of showing the character, it prints the HTML entity (eg.: é). Is there a config/adjustment I can do to correct this ? I also have to use the selected value as a parent for another control.
Save Changes
Cancel
Mingan
asked at 24 Apr 2019
Answers
B
I
{code}
?
you can edit awem.js, find var entityMap = { "&": "&", "<": "<", and add "é" : "é" you can set the autocomplete as a parent, you could also use [https://demo.aspnetawesome.com/AutocompleteDemo#Storing-selected-value-key-in-a-separate-field-using-PropId PropId ] to have separate input storing the Key of the selected item, and set that hidden input as parent instead of autocomplete you can also use [https://demo.aspnetawesome.com/AjaxRadioListDemo#oremotesearch combobox with remote search] --- another option would be to not encode the values at the server by setting false in KeyContent and encode the text yourself: text = text.Replace("\"", """).Replace("'", "'").Replace("<", "<").Replace(">", ">"); new KeyContent(id, text, false)
Save Changes
Cancel
Omu
answered at 24 Apr 2019
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK