I wrote the following script to change "<br>" in page text (<br> in HTML) into "<br/>" in HTML (a line break in page text). It will eventually do the same to "<br/>" in page text (<br/> in HTML), but for testing purposes I started with just "<br>". The script works perfectly in Firefox and Chrome, but does nothing in IE (not even returning an error in a try-catch clause). Any ideas why it does this or how to fix it?
var theTDs = document.getElementsByTagName("TD");
var counter1 = 0;
while(counter1 < theTDs.length)
var TDHTML = theTDs[counter1].HTMLContent || theTDs[counter1].innerHTML;