Test XHTML serializer with entities and selection

Mozilla Bug

    ';
      is(out, expected, "test short attr #4");

      node = document.getElementById('shortattr5');
      encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw);
      encoder.setNode(node);
      out = encoder.encodeToString();
      expected = '';
      is(out, expected, "test short attr #5");

      node = document.getElementById('shortattr6');
      encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw);
      encoder.setNode(node);
      out = encoder.encodeToString();
      expected = '';
      is(out, expected, "test short attr #6");

      node = document.getElementById('shortattr7');
      encoder.init(document, "application/xhtml+xml",de.OutputSelectionOnly | de.OutputRaw);
      encoder.setNode(node);
      out = encoder.encodeToString();
      expected = '';
      is(out, expected, "test short attr #7");

      // test on _moz and -moz attr
      node = document.getElementById('mozattr');
      encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly | de.OutputRaw);
      encoder.setNode(node);
      out = encoder.encodeToString();
      expected = ' lorem ipsum';
      is(out, expected, "test -moz/_moz attr");

      node.setAttribute('_moz_c','barc');
      node.setAttribute('_-moz_d','bard');
      node.setAttribute('__moz_e','bare');

      encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly | de.OutputRaw);
      encoder.setNode(node);
      out = encoder.encodeToString();
      expected = ' lorem ipsum';
      is(out, expected, "test -moz/_moz attr #2");

      SimpleTest.finish();
    }

    SimpleTest.waitForExplicitFinish();

    addLoadEvent(testHtmlSerializer_1);
    //]]>

This is a draggable bit of text.

1. Lorem ipsum dolor
2. sit amet, consectetuer
3. adipiscing elit
4. Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus aliquet lectus. Nunc vitae eros. Class
5. aptent taciti

lorem ipsum