no more stupid warnings for the NL
authorx2000habouzit <x2000habouzit>
Sat, 4 Sep 2004 21:58:22 +0000 (21:58 +0000)
committerx2000habouzit <x2000habouzit>
Sat, 4 Sep 2004 21:58:22 +0000 (21:58 +0000)
closes: FS#69

it's good to see we write clean xhtml code :)

htdocs/newsletter.php
templates/newsletter.tpl

index ccbf3c1..31a7d49 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: newsletter.php,v 1.6 2004-09-02 22:27:05 x2000habouzit Exp $
+        $Id: newsletter.php,v 1.7 2004-09-04 21:58:22 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -44,7 +44,7 @@ if (($res)&&(list($nl_date, $nl_titre, $nl_text) = mysql_fetch_row($res))) {
         $mymail->addHeader("From: \"Equipe polytechnique.org\" <info_newsletter@polytechnique.org>");
         $mymail->setBody("Suite à ta demande sur le site web, nous te réexpédions cette lettre d'informations archivée.\r\n\r\n".strip_tags($nl_text));
         $mymail->send();
-        $page->assign('erreur', '<p class="erreur">Mail envoyé.</p>');
+        $page->assign('erreur', 'Mail envoyé.');
     }
 }
 
index 528e522..8c57c96 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: newsletter.tpl,v 1.7 2004-08-31 11:25:39 x2000habouzit Exp $
+        $Id: newsletter.tpl,v 1.8 2004-09-04 21:58:22 x2000habouzit Exp $
  ***************************************************************************}
 
 
 {dynamic}
 
-{$erreur}
+<p class="erreur">{$erreur}</p>
 
 {if $nl_titre}
 
@@ -38,7 +38,7 @@
   </tr>
   <tr>
     <td style="padding: 1em;">
-      <tt>{$nl_text|smarty:nodefaults|replace:" ":"&nbsp;"|nl2br}</tt>
+      <tt style="white-space:pre;">{$nl_text|smarty:nodefaults|replace:"<u>":"<span style='text-decoration:underline;'>"|replace:"</u>":"</span>"|nl2br}</tt>
     </td>
   </tr>
 </table>