1 <p>This tests for a bug when removing links from a selection with Unlink. There shouldn't be any links *inside the selection* below.
</p>
2 <div contenteditable=
"true"><a href=
"http:://www.google.com/"><div>Hel
<span id=
"start">lo
</span></div></a><div><span id=
"end">W
</span>orld!
</div></div>
5 var start
= document
.getElementById("start");
6 var end
= document
.getElementById("end");
7 var sel
= window
.getSelection();
8 sel
.setBaseAndExtent(start
, 0, end
, end
.childNodes
.length
);
10 document
.execCommand("Unlink");