Make <wbr> stuff actually work
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 18 May 2011 13:45:07 -0600
changeset 145 1f5dfd58bff3
parent 144 579b0f28a2c6
child 146 afbc714d572b
Make <wbr> stuff actually work
autoimplementation.html
--- a/autoimplementation.html	Wed May 18 13:38:02 2011 -0600
+++ b/autoimplementation.html	Wed May 18 13:45:07 2011 -0600
@@ -1730,12 +1730,14 @@
 	// Insert <wbr> so IE doesn't stretch the screen
 	for (var i = 0; i <= 2; i++) {
 		try {
-			tr.childNodes[i].lastChild.firstChild.innerHTML =
-				tr.childNodes[i].lastChild.firstChild.textContent
+			var text = tr.childNodes[i].lastChild.firstChild.textContent;
+			tr.childNodes[i].lastChild.removeChild(tr.childNodes[i].lastChild.firstChild);
+			tr.childNodes[i].lastChild.innerHTML = text
 				.replace(/&/g, "&amp;")
 				.replace(/</g, "&lt;")
 				.replace(/>/g, "><wbr>")
-				.replace(/&lt;/g, "<wbr>&lt;");
+				.replace(/&lt;/g, "<wbr>&lt;")
+				+ tr.childNodes[i].lastChild.innerHTML;
 		} catch (e) {};
 	}
 }