     ')
 
     reset = (html = originalHtml) ->
-      $('#editor-container').html(Tandem.Utils.cleanHtml(html))
+      $('#editor-container').html(Tandem.Utils.cleanHtml(html, true))
       editor = new Tandem.Editor('editor-container')
       editor.ignoreDomChanges = true
       return editor

      length: 6
      expected:
        '<div>
          <b>123</b>
          <i>456</i>
        </div>
        <div>
          <b>
            <s>7</s>
            <u>8</u>
            <s>9</s>
            <u>0</u>
          </b>
        </div>
        <div>
          <b>abcdefg</b>
        </div>'
    }]


    _.each(tests, (test) ->
      _.each({apply: true, remove: false}, (truth, name) ->
        it("should #{name} to #{test.target}", ->
          [startHtml, endHtml] = if truth then [originalHtml, test.expected] else [test.expected, originalHtml]
          editor = reset(startHtml)
          editor.applyAttribute(test.start, test.length, 'bold', truth)
          delta = editor.doc.toDelta()
          editor.doc.root.innerHTML = Tandem.Utils.cleanHtml(endHtml)
          editor.doc.buildLines()
          expect(delta).to.deep.equal(editor.doc.toDelta())
          expect(editor.doc.checkConsistency(true)).to.be.true

      length: 1
      expected:
        '<div>
          <#>123</#>
          <i>456</i>
        </div>
        <div>
          <s>7</s>
          <#>
            <u>8</u>
          </#>
          <s>9</s>
          <u>0</u>
        </div>
