I have a .NET MVC page with a list of items that each have
<%: %>
encoded descriptions in the rel
.
I want to be able to search for all items with a rel
that contains my search query.
One of the fields has a value with htmlentities rel='Décoration'
I type "Décoration" in the search box, let jQuery search for all elements that have a 'rel' attribute that contains (indexOf != -1) that value:
no results!
Why? because Décoration != Décoration
.
What would be the best solution to compare these two? (Has to work for all special accented characters, not just é
)
P.S. (I tried escape/unescape on both sides, also tried the trick to append it to a div and then read it as text, this replaces dangerous stuff, but doesn't replace é (it doesn't have to because it's valid in utf-8 anyway))