Here's my question. I need to create an a href = (..) using DOM and the href should contains some ampersand.
What I did:
var anchor = document.createElement('a');
var link = "../php/page.php?id=100&mode=edit";
anchor.setAttribute("href", link);
parent.appendChild(anchor);
The problem I have is that when I try to click on the link the & amp; remains and it's not escaped to and as it should.