Empty contents by removing them with DOM manipulation

IE has a bug that corrupts the DOM tree of an element when its innerHTML
 is assigned.
Merge pull request #1465 from aadsm/repetition-innerhtml

Empty contents by removing them with DOM manipulation