[sip-comm-dev] Another display problem (smiley bug ;) )


#1

Hi all,
Although Vincent and I fixed a bug in ChatConversationPanel a while
ago (the nasty bug that totally messed up link display of "text/html"
data), I found myself facing another problem while trying to get the
nicest looking possible experience with the RSS plugin.
Should smilies be replaced/inserted in the output, even if we send
already formatted text? As is the case with the RSS plugin, the
ChatConversationPanel receives already formatted HTML text. Putting
smilies in this text is either buggy (right now) or complicated.
Let me explain why:
  * it's buggy because when the text already contains graphical
smilies (that is, <img> tags representing smilies), the output is
totally messed up if the 'alt' attribute of the afore-mentioned 'img'
tag contains the textual smiley. As one image is more than one
thousand words, please refer to the attached screenshot. It's produced
for http://gramos.wordpress.com/comments/feed but it's linkely to
happend to any (wordpress) feed that has the mentioned requirements.
  * it's complicated to fix in order to correctly (re)place smilies in
the html text because that would mean parsing the message passed to
processSmilies() in ChatConversationPanel in context sensitive way,
which isn't quite simple. It would take at least 2 (3?) nested
Regexp/Match and would still miserably fail if the text would contain
an inappropriately escaped < or >.

So my question is: do you think (or better, know for sure) that smiley
substitution is necessary for texts of content-type "text/html"?

All the best,
Mihai