From a14159bffdc1ea08c97e6634dc1480619bdc478a Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Fri, 2 Feb 2007 10:17:48 +0000 Subject: [PATCH] Many UTF-8 fixes: -> replace_accent and soundex_fr (remove the last dependence on Diogenes) -> first XDB implementation using procedural mysqli -> use Tidy 2.0 -> add the 'u' modifier on preg_ to catch multi-bytes characters ... git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1461 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/platalpage.php | 12 +++---- classes/plmailer.php | 4 +-- classes/session.php | 5 +-- classes/xdb.php | 38 +++++++++++--------- htdocs/.htaccess.in | 1 - htdocs/javascript/ajax.js | 3 +- htdocs/javascript/close_on_esc.js | 1 + htdocs/javascript/do_challenge_response.js | 3 +- htdocs/javascript/do_challenge_response_logged.js | 1 + htdocs/javascript/md5.js | 1 + htdocs/javascript/motdepasse.js | 5 +-- htdocs/javascript/overlib.js | 1 + htdocs/javascript/secure_hash.js | 1 + htdocs/javascript/sha1.js | 1 + htdocs/javascript/wiki.js | 1 + htdocs/javascript/xorg.js | 5 +-- include/globals.inc.php.in | 6 ++-- include/massmailer.inc.php | 2 +- include/url_catcher.inc.php | 4 +-- include/user.func.inc.php | 4 +-- include/xnet/session.inc.php | 2 +- include/xorg.misc.inc.php | 43 +++++++++++++++++++++-- modules/search/classes.inc.php | 9 ++--- modules/xnetgrp/mail.inc.php | 2 +- plugins/block.tidy.php | 40 +++++++++------------ 25 files changed, 120 insertions(+), 75 deletions(-) diff --git a/classes/platalpage.php b/classes/platalpage.php index c07f6c6..dc75267 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -264,8 +264,8 @@ function at_to_globals($tpl_source, &$smarty) function trimwhitespace($source, &$smarty) { $tags = '(script|pre|textarea)'; - preg_match_all("!<$tags.*?>.*?!is", $source, $tagsmatches); - $source = preg_replace("!<$tags.*?>.*?!is", "&&&tags&&&", $source); + preg_match_all("!<$tags.*?>.*?!ius", $source, $tagsmatches); + $source = preg_replace("!<$tags.*?>.*?!ius", "&&&tags&&&", $source); // remove all leading spaces, tabs and carriage returns NOT // preceeded by a php close tag. @@ -300,12 +300,12 @@ function hide_emails($source, &$smarty) { //prevent email replacement in