GenerateClipboardHtml(): Check internal size calculation at the end.
GenerateClipboardHtml(): Simplify buffer fill loop.