Version: git-latest (using KDE 4.6.1) OS: Linux When copying a longer portion of content from chat view, it copies html and then when pasted into chat input, it pastes the html including the avatars etc. See the attached screenshot. Reproducible: Always
Created attachment 58536 [details] Screenshot with the bug
I think it copies both the HTML and plaintext, as you can have various mimetypes in the clipboard at any time. At which point we may be able to get away with just running setAcceptRichText(false) in the ChatTextEdit. (not tested)
That could work, yeah, also for different sources which would otherwise paste a "garbled" text. Although we should probably also consider a use case, where you want to copy the conversation and paste it elsewhere (mail, pastebin etc.).
(In reply to comment #2) > I think it copies both the HTML and plaintext, as you can have various > mimetypes in the clipboard at any time. > > At which point we may be able to get away with just running > setAcceptRichText(false) in the ChatTextEdit. > > (not tested) The setAcceptRichText(false) in the ChatTextEdit works as it eliminates all html and pastes only text. It's a one line patch. (tested) Is there anything else we're supposed to look out for?
Ship it! We can deal with anything else if/when it comes up.
Git commit 8586347e2e6f8cdd65fc0a8b2b004af65e007458 by Francesco Nwokeka. Committed on 05/04/2011 at 00:58. Pushed by nwokeka into branch 'master'. FIX: Strip down HTML when copying from chat view BUG: 269996 REVIEW: David Edmundson set the "setAcceptRichText" to false so we don't accept anything unwanted apart from normal text M +3 -0 lib/chat-text-edit.cpp http://commits.kde.org/telepathy-chat-handler/8586347e2e6f8cdd65fc0a8b2b004af65e007458
Great it is fixed. But consider the use cases in comment 3, we should consider different targets for pasting, therefore we should fix the source, not the (one) target.