mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 07:49:28 +01:00
added charset to htmlspecialchars for multibyte chars
This commit is contained in:
parent
18bc2d2875
commit
6b72df97ec
@ -1,4 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* eGroupWare - eTemplates - xml-tools - helper class to create xml-files *
|
||||||
|
* http://www.eGroupWare.org *
|
||||||
|
* Originaly from the phpGW XSLT API *
|
||||||
|
* Adapted by Ralf Becker <RalfBecker@outdoor-training.de> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program 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. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
function var2xml($name, $data)
|
function var2xml($name, $data)
|
||||||
{
|
{
|
||||||
$doc = new xmltool('root','','');
|
$doc = new xmltool('root','','');
|
||||||
@ -480,7 +494,7 @@
|
|||||||
reset($this->attributes);
|
reset($this->attributes);
|
||||||
while(list($key,$val) = each ($this->attributes))
|
while(list($key,$val) = each ($this->attributes))
|
||||||
{
|
{
|
||||||
$result .= ' '.$key.'="'.htmlspecialchars($val).'"';
|
$result .= ' '.$key.'="'.htmlspecialchars($val,ENT_COMPAT,'utf-8').'"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,12 +523,12 @@
|
|||||||
}
|
}
|
||||||
else*/if(strlen($this->data) > 30 && !empty($this->indentstring))
|
else*/if(strlen($this->data) > 30 && !empty($this->indentstring))
|
||||||
{
|
{
|
||||||
$result .= "\n".$indentstring.$this->indentstring.htmlspecialchars($this->data)."\n";
|
$result .= "\n".$indentstring.$this->indentstring.htmlspecialchars($this->data,ENT_COMPAT,'utf-8')."\n";
|
||||||
$endtag_indent = $indentstring;
|
$endtag_indent = $indentstring;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result .= htmlspecialchars($this->data);
|
$result .= htmlspecialchars($this->data,ENT_COMPAT,'utf-8');
|
||||||
$endtag_indent = '';
|
$endtag_indent = '';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user