Browse files is only picking the first node from the old header and tra…


it to the new header, due to the nodelist being modified. Here's an easy fix.
Props to Geoff Lankow.
  • Loading branch information...
1 parent bfc12a9 commit 5d9df85826a432dcc837996942b279937ba7c80f @rubys committed Sep 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 filters/
@@ -28,7 +28,7 @@
for i in range(6,0,-1):
for oldhead in doc.getElementsByTagName('h%d' % i):
newhead = doc.createElementNS(XHTML_NAMESPACE, 'h%d' % (i+minhead-first))
- for child in oldhead.childNodes:
+ for child in oldhead.childNodes[:]:
oldhead.parentNode.replaceChild(newhead, oldhead)

0 comments on commit 5d9df85

Please sign in to comment.