Refactored HtmlClipboard to not use memcpy.