This JavaScript code successfully replaces a string in Chrome:
myUrl = someUrl.replace('%2C%7B%22itn%22%3A%5B%22%20guidelines%20%22%5D%7D', '');
However, when tested in Internet Explorer, it does not replace the string as expected.
The issue seems to be related to how IE handles %22
, where debugging the code and replacing %22
with "
temporarily resolves the problem. But making that change within the script causes errors in both Chrome and IE.
How can I modify this script to ensure cross-browser compatibility?