------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=118689
ogoffart kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From ogoffart kde org 2006-04-15 11:01 -------
SVN commit 530057 by ogoffart:
Fix Bug 118689: Incoming emoticons appear unpredictably
BUG: 118689
This was caused because on rich text messages, there is <span> or <p> arround
the text, and the > or < was not considered as a space. now it is.
M +7 -10 kopeteemoticons.cpp
--- branches/kopete/0.12/kopete/libkopete/private/kopeteemoticons.cpp
#530056:530057
@ -176,13 +176,11 @
continue;
}
- if ( mode & StrictParse )
- //<br /> marks beginning of line
- if ( !p.isSpace() && message.mid(pos - 6, 6) !=
QString::fromLatin1("<br />"))
- {
- p = c;
- continue;
- } /* strict requires space before the emoticon */
+ if ( (mode & StrictParse) && !p.isSpace() && p != '>')
+ { // '>' may mark the end of an html tag
+ p = c;
+ continue;
+ } /* strict requires space before the emoticon */
if ( d->emoticonMap.contains( c ) )
{
emoticonList = d->emoticonMap[ c ];
@ -199,8 +197,7 @
/* check if the character after this
match is space or end of string*/
n = message[ pos +
needle.length() ];
//<br/> marks the end of a line
- if( message.mid( pos +
needle.length(), 3) != QString::fromLatin1("<br") &&
- !n.isSpace() &&
!n.isNull() && n!= '&')
+ if( n != '<' && !n.isSpace() &&
!n.isNull() && n!= '&')
break;
}
/* Perfect match */
@ -461,7 +458,7 @
//TODO xml:lang
items <<
emoticonElement.text();
}
- else if(
emoticonElement.tagName() == QString::fromLatin1( "object" ) )
+ else if(
emoticonElement.tagName() == QString::fromLatin1( "object" ) &&
emoticon_file.isEmpty() )
{
QString mime=
emoticonElement.attribute(
QString::fromLatin1( "mime" ), QString::fromLatin1("image/*") );
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel