Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 78 → Rev 79

/trunk/serveur/bibliotheque/fonctions/eribo_encodage.fonct.php
New file
0,0 → 1,85
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of eRibo. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: eribo_encodage.fonct.php,v 1.1 2005-01-18 12:14:24 jpm Exp $
/**
* Fonctions manipulant les encodages
*
* Fichiers contenant des fonctions manipulant l'encodage.
*
*@package eRibo
*@subpackage Fonctions
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2005-01-18 12:14:24 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE DES FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/**
* La fonction remplaceEntiteHTLM() remplace des caractères par les entités html.
*
* Cette fonction retourne un texte dans lequel touts les caractères correspondant
* à des entités html sont remplacés par la valeur de l'entité, à l'exception
* des caractères <, >, & et ".
* Cela permet de remplacer toutes les entités dans une chaine contenant du html.
*
*@param string la chaîne html à parsser.
*@return string contient la chaîne html avec les entités intégrées.
*/
 
function remplaceEntiteHTLM($texte)
{
$texte_retour = '';
$tab_entites = get_html_translation_table(HTML_ENTITIES);
unset($tab_entites['"']);
unset($tab_entites['<']);
unset($tab_entites['>']);
unset($tab_entites['&']);
return strtr($texte, $tab_entites);
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>