We have some tag values that contain ampersands and these are now being rendered incorrectly in the auto complete list. Each key press is causing the extra text "amp;" to be inserted in place of the ampersand so the text value ends up like this..."Banking amp;amp;amp;amp; Finance" (Note that I had to remove the ampersand character from the example).
We have been using Tagify for a while and don't recall seeing this issue before so not sure if it is something that has been introduced in a recent update.
Thanks for reporting, I will check
Every issue should have a demo page, if possible, so I could fully understand the situation in order to help.
I've made a demo, from the little I understand about what you've describe, and all seems fine:
https://jsbin.com/gixopefiju/1/edit?html,js,output
Thanks for creating the demo. Type "a" and then hit the down arrow on the keyboard and you will see the amp; appear in the auto complete list.
You did not specify to use the keyboard in your issue...therefor I've spent time debugging this using the mouse, since it never occured to me to use the keyboard.
This is why it's imperative to follow the template when opening an issue and correctly fill out the "steps to reproduce" section and also supply a demo.
I will fix this now that I know it's a keyboard-related bug, hopefully will push a release today
Sorry for not providing all the information. The problem is not just keyboard related in our use case, but also happens as you type. I have further isolated the issue to the way we are constructing the whitelist. Please see this demo: https://jsbin.com/nabekayada/edit?html,js,output
I see. well, for an even more complete isolation of the problem:
whitelist: [{value:"&"}]
Then every time the dropdown is shown (by giving focus to the Tagify component), there is an escaping happening of the & character. I will test locally and let you know
Fixed on v3.21.5 which was just published a few minutes ago
Let me know if this persists (hopefully not :))
Thanks for reporting!
I can confirm that this is now resolved. Thanks for the fast turnaround!
Most helpful comment
I can confirm that this is now resolved. Thanks for the fast turnaround!