summaryrefslogtreecommitdiff
path: root/lib/js/urweb.js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@csail.mit.edu>2016-08-02 15:32:38 -0400
committerGravatar GitHub <noreply@github.com>2016-08-02 15:32:38 -0400
commitb3f8862743007588173db6c65b0fa093e0b8e81d (patch)
tree3ccc088fd45f56a47d7a4d8c13fa6c6a7c654e37 /lib/js/urweb.js
parentb14760f0724926327a35dcb5e8592266632101cf (diff)
parentfb5324f8180b089c75f12d165869909db941878f (diff)
Merge pull request #34 from saulo2/master
Fix for "normalizeTable" nesting thead and tfoot in tbody
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r--lib/js/urweb.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 1f44a97b..68e7979d 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -879,10 +879,12 @@ function normalizeTable(table) {
for (script = table.firstChild; script && script != tbody; script = next) {
next = script.nextSibling;
- if (firstChild)
- tbody.insertBefore(script, firstChild);
- else
- tbody.appendChild(script);
+ if (script.tagName === "SCRIPT") {
+ if (firstChild)
+ tbody.insertBefore(script, firstChild);
+ else
+ tbody.appendChild(script);
+ }
}
return;