SVN commit 454901 by duffeck: forwardport: deal with font and size changes. M +22 -0 yahoocontact.cpp --- trunk/KDE/kdenetwork/kopete/protocols/yahoo/yahoocontact.cpp #454900:454901 @@ -232,6 +232,28 @@ } } + // find and replace Font-formattings + regExp.setPattern( "]*)font-family:([^;\"]*)([^>]*)>(.*)" ); + pos = 0; + while ( pos >= 0 ) { + pos = regExp.search( messageText, pos ); + if ( pos >= 0 ) { + pos += regExp.matchedLength(); + messageText.replace( regExp, QString::fromLatin1("\\4" ) ); + } + } + + // find and replace Size-formattings + regExp.setPattern( "]*)font-size:([0-9]*)pt([^>]*)>(.*)" ); + pos = 0; + while ( pos >= 0 ) { + pos = regExp.search( messageText, pos ); + if ( pos >= 0 ) { + pos += regExp.matchedLength(); + messageText.replace( regExp, QString::fromLatin1("\\4" ) ); + } + } + // remove span-tags regExp.setPattern( "]*)>(.*)" ); pos = 0;