StropheCappuccino API 1.0.0
/tmp/tempDoc.doc/TNStropheUtils.j
Go to the documentation of this file.
00001 /*
00002  * TNStropheUtils.j
00003  *
00004  * Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu>
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU Affero General Public License as
00007  * published by the Free Software Foundation, either version 3 of the
00008  * License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU Affero General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Affero General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  */
00018 
00019 TNStropheStripHTMLCharCode = function(str)
00020 {
00021     str = str.replace(/&amp;/g, '&');
00022     str = str.replace(/&nbsp;/g, ' ');
00023     str = str.replace(/&quote;/g, '\"');
00024     str = str.replace(/&apos;/g, '\'');
00025     str = str.replace(/&lt;/g, '<');
00026     str = str.replace(/&gt;/g, '>');
00027     str = str.replace(/&agrave;/g, 'à');
00028     str = str.replace(/&ccedil;/g, 'ç');
00029     str = str.replace(/&egrave;/g, 'è');
00030     str = str.replace(/&eacute;/g, 'é');
00031     str = str.replace(/&ecirc;/g, 'ê');
00032     return str;
00033 }
 All Classes Namespaces Files Functions Variables