diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp index a6d0f5bbcc2d..b5adb68ebf8f 100644 --- a/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -960,10 +960,14 @@ nsHTMLEditor::ParseCFHTML(nsCString & aCfhtml, PRUnichar **aStuffToPaste, PRUnic } else if (aCfhtml[curPos] == '<') { - // working backwards, the first thing we see is the start of a tag - // so StartFragment is bad, so we need to update it. - NS_ASSERTION(0, "StartFragment byte count in the clipboard looks bad, see bug #228879"); - startFragment = curPos - 1; + // if we are at the start, then we want to see the '<' + if (curPos != startFragment) + { + // working backwards, the first thing we see is the start of a tag + // so StartFragment is bad, so we need to update it. + NS_ASSERTION(0, "StartFragment byte count in the clipboard looks bad, see bug #228879"); + startFragment = curPos - 1; + } break; } else