1

I have this javascript code:

label.innerHTML = value;
$this.replaceWith(label.cloneNode(true));

For value I have "T00C&T". On every browser I get this value, except on IE8 where I get "T00C" only. I've tried change innerHTML to text but then it's not working on Chrome. If I use innerText then it's not working on Mozzila. Also I've tried textContent without results.

I don't know how to sync all browsers to work without checking browser version. Is there any way to do that?

Karol S
  • 9,028
  • 2
  • 32
  • 45
freshbm
  • 5,540
  • 5
  • 46
  • 75

1 Answers1

0

supported across browsers

Use the following Numbered HTML entity replacement for &:

& →  &
Tushar Gupta
  • 15,504
  • 1
  • 29
  • 47