we have some legacy code where Html element ID's are populated dynamically from database data (I cant change the data here)
ex. <input type="text" id="2314/test/film/code\branch"/>
when I get the ID from click event like below
var src = window.event.srcElement;
I get src.id= "2314/test/film/code\\branch";
I want to use the src.id
to find the same element in different function like $(_element).find("[id='" + src.id + "']").get();
which is failing to get any ID since I see "\"
is replaced with "\\"
Please suggest me how to get around this ?