git-archimport-id: opensource@polytechnique.org--2005/banana--mainline--1.0--patch-24
$cuts = displayshortcuts();
$html = '<h1>'._b_('Nouveau message').'</h1>'.$cuts;
- $html .= '<form action="?group='.$group.'" method="post" accept-charset="utf8">';
+ $html .= '<form action="?group='.$group.'" method="post" accept-charset="utf-8">';
$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_('Organisation').'</td><td>'.$this->profile['org'].'</td></tr>';
$html .= '<tr><th colspan="2">'._b_('Corps').'</th></tr>';
$html .= '<tr><td colspan="2"><textarea name="body" cols="74" rows="16">'
- .$body.($this->profile['sig'] ? "\n\n-- \n".htmlentities($this->profile['sig']) : '').'</textarea></td></th>';
+ .to_entities($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.'" />';
function _b_($str) { return utf8_decode(dgettext('banana', utf8_encode($str))); }
-function to_html($str, $charset) {
+function to_entities($str) {
require_once 'banana/utf8.php';
- return utf8entities(htmlentities(iconv($charset, 'utf8', $str), ENT_NOQUOTES, 'UTF-8'));
+ return utf8entities(htmlentities($str, ENT_NOQUOTES, 'UTF-8'));
}
/********************************************************************************
}
function formatbody($_text) {
- $res = "\n\n" . wrap($_text, "")."\n\n";
+ $res = "\n\n" . to_entities(wrap($_text, ""))."\n\n";
$res = preg_replace("/(<|>|")/", " \\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("/ (<|>|") /", "\\1", $res);
}
if (preg_match('!charset=([^;]*)\s*(;|$)!', $this->headers['content-type'], $matches)) {
- require_once 'banana/misc.inc.php';
- $this->body = to_html($this->body, $matches[1]);
+ $this->body = iconv($matches[1], 'utf-8', $this->body)
}
}
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-24 10:50+0200\n"
+"POT-Creation-Date: 2005-05-24 12:48+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"