#209 group chat doesn't like HTML

OBSOLETE_(1.16.x)
closed-fixed
None
Pidgin
5
2016-04-23
2013-07-30
wjessee
No

multi-line input in a group chat will fail to post to the chat room. The current code changes
to
in the submission to the lync host. The correct change is to replace
with "\r\n". This can be accomplished by editing line 984 in sipe-groupchat.c from:
tmp = replace(what, "
", "
");
to:
tmp = replace(what, "
", "\r\n");

Recompile & it works

Discussion

  • wjessee

    wjessee - 2013-07-30

    ahh html got hosed!
    replace: tmp = replace(what, "<br>", "<br/>");
    with: tmp = replace(what, "<br>", "\r\n");
    on line 984 in sipe-groupchat.c

     
  • Stefan Becker

    Stefan Becker - 2013-08-05
    • summary: Multi-line input in group chat --> group chat doesn't like HTML
     
  • Stefan Becker

    Stefan Becker - 2013-08-05

    It's even worse...

    According to [MS-XCCOSIP], section 2.2.2.9:

    Chat: The value of this element is the plain text representation of the chat content.

    Rtf (optional): The value of this optional element is the Rich Text Format (RTF) representation of the chat content.

    It seems that the server does some HTML filtering, but barfs on nested and single HTML tags, e.g.

    • <b><i>bold italic</i></b>
    • multi line 1<br/>multi line 2

    with a really absurd error message:

    SIP/2.0 503 Service Unavailable
    ...
    Ms-diagnostics: 20000;source="XXX";reason="Chat service busy";component="PersistentChat"
    

    Well done, Microsoft! SIPE will have to remove all HTML tags from the text before sending it to the server.

    Preserving the formatting would require converting the HTML to RTF and vice versa. Unfortunately there seems to be no widely available open source library for this task :-(

     
  • Stefan Becker

    Stefan Becker - 2013-08-05
    • status: open --> closed-fixed
    • assigned_to: Stefan Becker
     
  • Stefan Becker

    Stefan Becker - 2013-08-05

    Fixed by commit 93939bc

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks