escape is now the default, no need to tell it twice
authorx2000habouzit <x2000habouzit>
Tue, 24 Aug 2004 09:07:57 +0000 (09:07 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 24 Aug 2004 09:07:57 +0000 (09:07 +0000)
include/xorg.page.inc.php
templates/evenements.tpl
templates/include/form.valid.aliases.tpl
templates/include/form.valid.emploi.tpl
templates/include/form.valid.ml.tpl
templates/include/x_inscrit.tpl
templates/logger-view.tpl
templates/rss.tpl
templates/sendmail.tpl
templates/table-editor.tpl

index 017fce6..4ddd950 100644 (file)
@@ -35,10 +35,11 @@ class XorgPage extends DiogenesCorePage {
         $this->plugins_dir[]= $globals->spoolroot."/plugins/";
         $this->config_dir   = $globals->spoolroot."/configs/";
         $this->cache_dir    = $globals->spoolroot."/cache/";
-
-        $this->config_overwrite=false;
-        $this->compile_check = isset($site_dev);
-        $this->caching = ($type == SKINNED);
+        
+       $this->default_modifiers = Array('escape');
+        $this->config_overwrite  = false;
+        $this->compile_check     = isset($site_dev);
+        $this->caching          = ($type == SKINNED);
 
         $this->_page_type = $type;
         $this->_tpl = $tpl;
index 3a8a567..56bd23d 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: evenements.tpl,v 1.1 2004-07-19 13:35:35 x2000habouzit Exp $ *}
+{* $Id: evenements.tpl,v 1.2 2004-08-24 09:07:57 x2000habouzit Exp $ *}
 
 <div class="rubrique">
   Proposition d'information événementielle
@@ -38,12 +38,12 @@ Tu as ajout
 {/if}
 
 <form action="{$smarty.request.PHP_SELF}" method="post" name="evenement_nouveau">
-  <input type="hidden" name="titre" value="{$titre|escape}" />
-  <input type="hidden" name="texte" value="{$texte|escape}" />
+  <input type="hidden" name="titre" value="{$titre}" />
+  <input type="hidden" name="texte" value="{$texte}" />
   <input type="hidden" name="promo_min" value="{$promo_min}" />
   <input type="hidden" name="promo_max" value="{$promo_max}" />
   <input type="hidden" name="peremption" value="{$peremption}" />
-  <input type="hidden" name="validation_message" value="{$validation_message|escape}" />
+  <input type="hidden" name="validation_message" value="{$validation_message}" />
   <input type="submit" name="action" value="Confirmer" />
   <input type="submit" name="action" value="Modifier" />
 </form>
index cd07356..b081f3e 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.aliases.tpl,v 1.3 2004-02-11 15:35:33 x2000habouzit Exp $ *}
+{* $Id: form.valid.aliases.tpl,v 1.4 2004-08-24 09:07:58 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
@@ -20,7 +20,7 @@
 <tr>
   <td>Motif :</td>
   <td style="border: 1px dotted inherit">
-    {$this->raison|escape:"html"|nl2br}
+    {$this->raison|nl2br}
   </td>
 </tr>
 <tr>
index 1ff0b12..b4b1bcb 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.emploi.tpl,v 1.1 2004-02-07 17:18:16 x2000habouzit Exp $ *}
+{* $Id: form.valid.emploi.tpl,v 1.2 2004-08-24 09:07:58 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
   <tbody>
     <tr>
       <td>Demandeur</td>
-      <td>{$valid->entreprise|escape:"html"} ({$valid->mail|escape:"html"})</td>
+      <td>{$valid->entreprise} ({$valid->mail})</td>
     </tr>
     <tr>
       <td>Titre du post</td>
-      <td>{$valid->titre|escape:"html"}</td>
+      <td>{$valid->titre}</td>
     </tr>
     <tr>
-      <td colspan="2"><pre>{$valid->text|escape:"html"}</pre></td>
+      <td colspan="2"><pre>{$valid->text}</pre></td>
     </tr>
     <tr>
       <td class="center" colspan="2">
index 455bcaa..1f107ac 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.ml.tpl,v 1.2 2004-02-11 15:35:33 x2000habouzit Exp $ *}
+{* $Id: form.valid.ml.tpl,v 1.3 2004-08-24 09:07:58 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
@@ -15,7 +15,7 @@
 </tr>
 <tr>
   <td>Motif :</td>
-  <td>{$valid->comment|escape:"html"|nl2br}
+  <td>{$valid->comment|nl2br}
   </td>
 </tr>
 <tr>
index 06a76c0..588ca19 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: x_inscrit.tpl,v 1.2 2004-02-19 13:42:58 x2000habouzit Exp $ *}
+{* $Id: x_inscrit.tpl,v 1.3 2004-08-24 09:07:58 x2000habouzit Exp $ *}
 
 <div class="contact">
   <div class="nom">
       <tr>
         <td class="lt">Profession:</td>
         <td class="rt">
-          {$c.entreprise|escape:"html"}
-          {if $c.secteur}( {$c.secteur|escape:"html"} ){/if}
-          {if $c.fonction}<br />{$c.fonction|escape:"html"} ){/if}
+          {$c.entreprise}
+          {if $c.secteur}( {$c.secteur} ){/if}
+          {if $c.fonction}<br />{$c.fonction} ){/if}
         </td>
       </tr>
       {/if}
       {if $c.libre}
       <tr>
         <td class="lt">Commentaire:</td>
-        <td class="rt">{$c.libre|escape:"html"|nl2br}</td>
+        <td class="rt">{$c.libre|nl2br}</td>
       </tr>
       {/if}
     </table>
index 3301dec..96bb96a 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: logger-view.tpl,v 1.2 2004-02-20 03:01:10 x2000habouzit Exp $ *}
+{* $Id: logger-view.tpl,v 1.3 2004-08-24 09:07:57 x2000habouzit Exp $ *}
 
 <div class="rubrique">
   Parcours des logs du site
@@ -38,7 +38,7 @@
 <tr class="{cycle values="impair,pair"}">
   <td style="font-size:90%;">{$myevent.stamp|date_format:"%Y-%m-%d %H:%M:%S"}</td>
   <td><strong>{$myevent.text}</strong></td>
-  <td>{$myevent.data|escape}</td>
+  <td>{$myevent.data}</td>
 </tr>
 {/foreach}
 </table>
index a6e0578..df08ec0 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: rss.tpl,v 1.2 2004-02-19 13:22:05 x2000habouzit Exp $ *}
+{* $Id: rss.tpl,v 1.3 2004-08-24 09:07:57 x2000habouzit Exp $ *}
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
 <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
@@ -14,7 +14,7 @@
 
 {foreach item=line from=$rss}
 <item>
-<title>{$line.titre|strip_tags|escape:"html"}</title>
+<title>{$line.titre|strip_tags}</title>
 <link>http://{$smarty.server.SERVER_NAME}/login.php#newsid{$line.id}</link>
 </item>
 {/foreach}
index dc8e033..9ab2bc0 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: sendmail.tpl,v 1.2 2004-02-09 17:47:06 x2000habouzit Exp $ *}
+{* $Id: sendmail.tpl,v 1.3 2004-08-24 09:07:57 x2000habouzit Exp $ *}
 
 {dynamic}
 
       <td class="titre">de&nbsp;:</td>
       <td>
         <input type='text' name='from' size=45 value="{if $smarty.request.from}
-{$smarty.request.from|escape:"html"}
+{$smarty.request.from}
 {else}
-{"\"`$smarty.session.prenom` `$smarty.session.nom`\" &lt;`$smarty.session.username`@polytechnique.org&gt;"|escape:"html"}
+"{$smarty.session.prenom} {$smarty.session.nom}" &lt;{$smarty.session.username}@polytechnique.org&gt;
 {/if}" />
       </td>
     </tr>
     <tr> 
       <td class="titre">à&nbsp;:</td>
       <td>
-        <input type='text' name='to' size=45 value="{$smarty.request.to|escape:"html"}" />
+        <input type='text' name='to' size=45 value="{$smarty.request.to}" />
       </td>
     </tr>
     <tr> 
       <td class="titre">copie&nbsp;:</td>
       <td>
-        <input type='text' name='cc' size=45 value="{$smarty.request.cc|escape:"html"}" />
+        <input type='text' name='cc' size=45 value="{$smarty.request.cc}" />
       </td>
     </tr>
     <tr> 
       <td class="titre">copie cachée&nbsp;:</td>
       <td>
-        <input type='text' name='bcc' size=45 value="{$smarty.request.bcc|escape:"html"}" />
+        <input type='text' name='bcc' size=45 value="{$smarty.request.bcc}" />
       </td>
     </tr>
     <tr> 
       <td class="titre">sujet&nbsp;:</td>
       <td> 
-        <input type='text' name='sujet' size=45 value="{$smarty.request.sujet|escape:"html"}" />
+        <input type='text' name='sujet' size=45 value="{$smarty.request.sujet}" />
       </td>
     </tr>
   </table>
@@ -79,7 +79,7 @@
 {/if}
     <td>
       <input type="checkbox" name="contacts[{$contact.username}]"
-      value="{"`$contact.prenom` `$contact.nom` &lt;`$contact.username`@polytechnique.org&gt;"|escape:"html"}"
+      value="{"`$contact.prenom` `$contact.nom` &lt;`$contact.username`@polytechnique.org&gt;"}"
         {if $smarty.request.contacts && $smarty.request.contacts.username}checked="checked"{/if} />
       <a href="javascript:x()" onclick="popWin('x.php?x={$contact.username}')">{$contact.prenom} {$contact.nom}</a> (X{$contact.promo})
     </td>
index 4ee60e2..4981732 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: table-editor.tpl,v 1.5 2004-07-17 11:23:09 x2000habouzit Exp $ *}
+{* $Id: table-editor.tpl,v 1.6 2004-08-24 09:07:57 x2000habouzit Exp $ *}
 
 {dynamic}
 
       </td>
       <td>
         {if $myval.type=="textarea"}
-        <textarea name="{$prefix}{$mykey}" rows="10" cols="70">{$myval.value|escape}</textarea>
+        <textarea name="{$prefix}{$mykey}" rows="10" cols="70">{$myval.value}</textarea>
         {elseif $myval.type=="set"}
         {if $myval.trans}
         {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.trans[$myval.value] trans=$myval.trans}
         {elseif $myval.type=="password"}
         <input type="password" name="{$prefix}{$mykey}" size="40" />
         {else}
-        <input type="{$myval.type}" name="{$prefix}{$mykey}" size="40" value="{$myval.value|escape}" />
+        <input type="{$myval.type}" name="{$prefix}{$mykey}" size="40" value="{$myval.value}" />
         {/if}
       </td>
     </tr>