To replicate go to http://cutesoft.net/example/JavaScript-API.aspx using IE8
1. Delete all content
2. Type any text
3. Hit enter
4. Type any text
5. Select first line of text
6. Use "insertlink" ExecCommand
The markup produced is this:
<div>
<a href="Http://CuteSoft.net">
<div>asd</div>
</a>
asd
</div>
Expected markup:
<div>
<a href="Http://CuteSoft.net">asd</a>
</div>
<div>
asd
</div>
This problem is even worse with line breaks of <p>