fixes
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Tue, 24 May 2005 08:46:34 +0000 (08:46 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:26 +0000 (00:34 +0100)
git-archimport-id: opensource@polytechnique.org--2005/banana--mainline--1.0--patch-21

Changelog
banana/banana.inc.php.in
banana/misc.inc.php
po/banana.pot

index b950355..e1060bf 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -5,6 +5,7 @@ Tue, 24 May 2005                                        Pierre Habouzit <pierre.habouzit@m4x.org>
 
        * Fix one problem with $this->ids beeing empty in Spool.
        * Fix encoding issues since iconv truncates strings sometimes.
+       * Make the post forms use utf-8.
 
 ================================================================================
 VERSION 1.0
index 1aa3772..1f39794 100644 (file)
@@ -23,7 +23,7 @@ class Banana
 
     var $wrap      = 74;
 
-    var $custom    = "Content-Type: text/plain; charset=iso-8859-15\nMime-Version: 1.0\nContent-Transfer-Encoding: 8bit\nUser-Agent: Banana @VERSION@\n";
+    var $custom    = "Content-Type: text/plain; charset=utf-8\nMime-Version: 1.0\nContent-Transfer-Encoding: 8bit\nUser-Agent: Banana @VERSION@\n";
 
     var $host      = 'news://localhost:119/';
 
@@ -228,17 +228,17 @@ class Banana
 
         $cuts  = displayshortcuts();
         $html  = '<h1>'._b_('Nouveau message').'</h1>'.$cuts;
-        $html .= '<form action="?group='.$group.'" method="post">';
+        $html .= '<form action="?group='.$group.'" method="post" accept-charset="utf8">';
         $html .= '<table class="bicol" cellpadding="0" cellspacing="0">';
         $html .= '<tr><th colspan="2">'._b_('En-têtes').'</th></tr>';
         $html .= '<tr><td>'._b_('Nom').'</td><td>'.htmlentities($this->profile['name']).'</td></tr>';
         $html .= '<tr><td>'._b_('Sujet').'</td><td><input type="text" name="subject" value="'.htmlentities($subject).'" size="60" /></td></tr>';
         $html .= '<tr><td>'._b_('Forums').'</td><td><input type="text" name="newsgroups" value="'.htmlentities($target).'" size="60" /></td></tr>';
         $html .= '<tr><td>'._b_('Suivi à').'</td><td><input type="text" name="followup" value="" size="60" /></td></tr>';
-        $html .= '<tr><td>'._b_('Organisation').'</td><td>'.$this->profile['org'].'</td></tr>';
+        $html .= '<tr><td>'._b_('Organisation').'</td><td>'.$this->profile['org']1.'</td></tr>';
         $html .= '<tr><th colspan="2">'._b_('Corps').'</th></tr>';
         $html .= '<tr><td colspan="2"><textarea name="body" cols="74" rows="16">'
-            .htmlentities($body).($this->profile['sig'] ? "\n\n-- \n".htmlentities($this->profile['sig']) : '').'</textarea></td></th>';
+            .$body.($this->profile['sig'] ? "\n\n-- \n".htmlentities($this->profile['sig']) : '').'</textarea></td></th>';
         $html .= '<tr><td colspan="2">';
         if ($id > 0) {
             $html .= '<input type="hidden" name="artid" value="'.$id.'" />';
index ea88ccd..41a37ba 100644 (file)
@@ -206,7 +206,7 @@ function wrap($text, $_prefix="")
 }
 
 function formatbody($_text) {
-    $res  = "\n\n" . htmlentities(wrap($_text, ""))."\n\n";
+    $res  = "\n\n" . wrap($_text, "")."\n\n";
     $res  = preg_replace("/(&lt;|&gt;|&quot;)/", " \\1 ", $res);
     $res  = preg_replace('/(["\[])?((https?|ftp|news):\/\/[a-z@0-9.~%$£µ&i#\-+=_\/\?]*)(["\]])?/i', "\\1<a href=\"\\2\">\\2</a>\\4", $res);
     $res  = preg_replace("/ (&lt;|&gt;|&quot;) /", "\\1", $res);
index e9e4342..84e1d28 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-24 09:15+0200\n"
+"POT-Creation-Date: 2005-05-24 10:46+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"