Evan Prodromou wrote:
Mark Keisler wrote:
Hi all.  I've installed a laconica site within the past week or so and
really like it.  I'm currently having an issue with posts via xmpp where
ampersands (&) are removed from a url contained in a notice.  So
http://foo.com/?a=b&c=d is posted and broadcast as http://foo.com/?a=bc=d

This seems to be happening at a fairly low level.  $pl['body'] is
already stripped at ./scripts/xmppdaemon.php handle_message().  I'm at
0.6.2 and am using PHP 5.2.6 on Gentoo Linux.  identi.ca doesn't seem to
have this issue.  I assume something is happening in XMPPHP but I can't
figure it out and why it would be happening to me an not identi.ca.

Any hints, comments, snide remarks?
 
I haven't seen this, but maybe you could make sure you're using the XMPPHP library that's shipped with Laconica? That's what we use for identi.ca.

-Evan

Alright, here's the fun.  I put a print_r into extlib/XMPPHP/XMPP.php message_handler() to show me the $xml object.  I had sent a jabber message of "this is a cool http://foo.bar/?foo=bar&bar=baz&ugh=io thing" and the object looks like:
....
            [2] => XMPPHP_XMLObj Object
                (
                    [name] => body
                    [ns] => jabber:client
                    [attrs] => Array
                        (
                        )

                    [subs] => Array
                        (
                        )

                    [data] => this is a cool http://foo.bar/?foo=barbar=bazugh=io thing
                )
            [3] => XMPPHP_XMLObj Object
                (
                    [name] => html
                    [ns] => http://jabber.org/protocol/xhtml-im
                    [attrs] => Array
                        (
                            [xmlns] => http://jabber.org/protocol/xhtml-im
                        )

                    [subs] => Array
                        (  
                            [0] => XMPPHP_XMLObj Object
                                (  
                                    [name] => body
                                    [ns] => http://www.w3.org/1999/xhtml
                                    [attrs] => Array
                                        (  
                                            [xmlns] => http://www.w3.org/1999/xhtml
                                        )

                                    [subs] => Array
                                        (  
                                            [0] => XMPPHP_XMLObj Object
                                                (  
                                                    [name] => a
                                                    [ns] => http://www.w3.org/1999/xhtml
                                                    [attrs] => Array
                                                        (  
                                                            [href] => http://foo.bar/?foo=bar&bar=baz&ugh=io
                                                        )

                                                    [subs] => Array
                                                        (
                                                        )

                                                    [data] => http://foo.bar/?foo=barbar=bazugh=io
                                                )

                                        )

                                    [data] => this is a cool  thing
                                )

                        )

                    [data] =>
                )


my jabber client (pidgin) URLifies the post to become

this is a cool <a href=''>
http://foo.bar/?foo=bar&bar=baz&ugh=io</a> thing

hence the separate href stanza in the XML object.  why is that the only part of the object to have the intact post, though?
-- 
Mark Keisler
Principal Software Engineer
Motorola Open Source Technologies
630-329-2828


_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to