From ff5e503480298fe9ff29d4002f393223d3e7b3ed Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 24 Sep 2005 13:59:34 +0000 Subject: [PATCH] real fix to the escape problem : quoted werent escaped correctly git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@43 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/platal/smarty.plugins.inc.php | 2 +- templates/emails/send.tpl | 2 +- templates/newsletter/submit.tpl | 2 +- templates/table-editor.tpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/platal/smarty.plugins.inc.php b/include/platal/smarty.plugins.inc.php index b5b7d10..4c79fd1 100644 --- a/include/platal/smarty.plugins.inc.php +++ b/include/platal/smarty.plugins.inc.php @@ -32,7 +32,7 @@ function escape_html($string) { if(is_string($string)) { - $transtbl = Array('<' => '<', '>' => '>', '"' => '"'); + $transtbl = Array('<' => '<', '>' => '>', '"' => '"', '\'' => '''); return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)/", "&" , strtr($string, $transtbl)); } else { return $string; diff --git a/templates/emails/send.tpl b/templates/emails/send.tpl index 998cb64..810f177 100644 --- a/templates/emails/send.tpl +++ b/templates/emails/send.tpl @@ -61,7 +61,7 @@ diff --git a/templates/newsletter/submit.tpl b/templates/newsletter/submit.tpl index 192914a..0a8611c 100644 --- a/templates/newsletter/submit.tpl +++ b/templates/newsletter/submit.tpl @@ -105,7 +105,7 @@ Les contacts, prix, adresses mail utiles, liens web, ... sont en sus, et sont Sujet - + diff --git a/templates/table-editor.tpl b/templates/table-editor.tpl index 1991a18..8910d0f 100644 --- a/templates/table-editor.tpl +++ b/templates/table-editor.tpl @@ -155,7 +155,7 @@ {/if} {else} - {$myval.value|escape} + {$myval.value} {/if} -- 2.1.4