title: I keep getting gt; when using substring or slice
body: <p>I'm building a video player with playlist and using symbol ">" to indicate which video is currently playing. I have the following function:</p>
  
  <pre><code>player.onended = function () {
          pl.childNodes[curVideo + 1].childNodes[0].innerHTML = pl.childNodes[curVideo + 1].childNodes[0].innerHTML.slice(1);
          ++curVideo;
          if (playlist.length == 0) {
              player.setAttribute("src", "");
          }
          else if (curVideo &lt; playlist.length) {
              player.setAttribute("src", playlist[curVideo]);
              pl.childNodes[curVideo + 1].childNodes[0].innerHTML = "&gt;" + pl.childNodes[curVideo + 1].childNodes[0].innerHTML;
          } else {
              curVideo = 0;
              player.setAttribute("src", playlist[curVideo]);
              pl.childNodes[curVideo + 1].childNodes[0].innerHTML = "&gt;" + pl.childNodes[curVideo + 1].childNodes[0].innerHTML;
          }
      }
  </code></pre>
  
  <p>I'm not changing this string anywhere else in the code, but when I delete this ">" with slice or substring instead of getting string without it I get this symbol replaced by "gt;".</p>
  
  <p>Before deletion:</p>
  
  <pre><code>&gt;htt://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4
  </code></pre>
  
  <p>After deletion:</p>
  
  <pre><code>gt;htt://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4
  </code></pre>