Our layout engine can't properly handle tabs (and it's doubtful how they should be handled
anyway on random pastes), and it breaks while trying. So now we replace tabs by 8 spaces.
Note that Konversation (and probably some others) currently sends a \t for the "italics" format.
This is non-standard and not very consistent across clients, so I chose to not have a tab trigger italics.
So for pastes, we show something mostly correct, while italic text sent from Konversation will cause
some whitespace instead. I think that's a better tradeoff than the other way round (showing italics
when tabs are pasted).
QString UiStyle::mircToInternal(const QString &mirc_) {
QString mirc = mirc_;
mirc.replace('%', "%%"); // escape % just to be sure
+ mirc.replace('\t', " "); // tabs break layout, also this is italics in Konversation
mirc.replace('\x02', "%B");
mirc.replace('\x0f', "%O");
mirc.replace('\x12', "%R");