garbled results

2007-03-09
2013-04-03
  • i'm using gmail-lite with libgmailer for php.
    everything was working fine until today. when i went to look at my inbox, everything looked garbled with weird u003c messages appearing everywhere. i went into the libgmailer.php and added the following line to fix this issue:

            * Parse Gmail responses.
            *
            * @access private
            * @static
            * @return bool
            * @param string $raw_html
            * @since 7 Jun 2005
            */
            function parse_gmail_response($raw_html,$non_standard = false) {
                    $raw_html = str_replace("\n", "", $raw_html);
                    $raw_html = str_replace("D([", "\nD([", $raw_html);
                    $raw_html = str_replace("]);", "]);\n", $raw_html);
                    // Fix Gmail's conversion of = and /; by Neerav; 18 Dec 2005
                    $raw_html = str_replace(array('u003d','u002f'),array('=','/'),$raw_html);

    /////// NEXT LINE FIXES THE PROBLEM I EXPERIENCED
                    $raw_html = str_replace('u003c','<',$raw_html);

    hopefully someone will find this useful.

     
    • thank you, this was very useful!

       
      • Sweet... worked great!

         
    • neerav
      neerav
      2007-03-09

      This change started rolling through accounts in late February.  They have started to encode the < character.  It was fixed in the library last week with the pre-emptive fix for the > character too.  The library has been updated in CVS.

      The fix described here will also do the trick.

       
    • I also had to change the config.php file to show messages in HTML form.

       
    • Worked for me without a change to my config.php.

      Thanks!

       
    • neerav
      neerav
      2007-05-09

      An updated gmail-lite has been released.

      --
      Neerav

      P.S. Please use http://gmail.sayni.net/forum as the support forum for gmail-lite and libgmailer.