FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » nntp charset problems
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: nntp charset problems [message #159095 is a reply to message #159087] Mon, 04 May 2009 08:42 Go to previous messageGo to previous message
webmaster_at_naszojciec is currently offline  webmaster_at_naszojciec   Poland
Messages: 4
Registered: April 2009
Karma:
Junior Member
Unfortunetly, in commited version is my first diff which is buggy.
There is posbility of double decode for subject.
Subject is decoded by decode_header_value.
Here is small patch for version 1.80 of nntp.inc.


<?php
--- nntp.inc.1.80       2009-05-04 10:36:19.000000000 +0200
+++ nntp.inc    2009-05-04 10:40:38.000000000 +0200
@@ -424,+424,@@
                        }

                        
$msg_post->subject apply_custom_replace($this->subject);
-                       if ( !
preg_match('!(.*?)(=\?([^?]+)\?(Q|B)\?([^?]*)\?=)([^=]*)!i'$msg_post->subject)) {
-                               
$msg_post->subject decode_string($msg_post->subject''$charset);
-                       }
                        
$msg_post->body decode_string($this->body$enc$charset);
                        if ( !
strlen($msg_post->subject) ) {
                                
$msg_post->subject "(no subject)";
?>

[Updated on: Mon, 04 May 2009 08:42]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HELP! Cannot login with exact username and password
Next Topic: Fud API Error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 18:20:44 GMT 2024

Total time taken to generate the page: 0.04685 seconds