pawelczak / EasyAutocomplete

JQuery autocomplete plugin
http://easyautocomplete.com
MIT License
729 stars 244 forks source link

Eascaping special characters #454

Open elena18 opened 3 years ago

elena18 commented 3 years ago

Which is the best way to escape special characters? In the json source I have an area name that is "Tañon Strait". I don't want people digiting the tilde, but instead by digiting "tan" they get their value

elena18 commented 3 years ago

@pawelczak here is the link to a piece of code I found about this issue, but I don't really know how to apply to easyautocomplete

var accentMap = { 'á': 'a', 'é': 'e', 'í': 'i', 'ó': 'o', 'ú': 'u' }; function accent_fold(s) { if (!s) { return ''; } var ret = ''; for (var i = 0; i < s.length; i++) { ret += accent_map[s.charAt(i)] || s.charAt(i); } return ret; };

The solution is mentioned also on Stackoverflow at this post Thanks

busubs commented 3 years ago

can u look my problem? https://github.com/pawelczak/EasyAutocomplete/issues/455

elena18 commented 3 years ago

I see, but you may misunderstood: I am not the author of the plugin and actually I thought you were the one!!!

Anyway I gave a look to your question and tried to answer at #455