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
  • 8,641
  • 2
  • 29
  • 44
freshbm
  • 5,637
  • 4
  • 45
  • 71

1 Answers1

0

supported across browsers

Use the following Numbered HTML entity replacement for &:

& →  &
Tushar
  • 13,804
  • 1
  • 24
  • 44