mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
e_parse small corrections, header keywords updated
This commit is contained in:
@@ -8,10 +8,8 @@
|
|||||||
*
|
*
|
||||||
* Text processing and parsing functions
|
* Text processing and parsing functions
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
* $URL$
|
||||||
* $Revision$
|
* $Id$
|
||||||
* $Date$
|
|
||||||
* $Author$
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -490,38 +488,39 @@ class e_parse
|
|||||||
//Fix - sanitize keys as well
|
//Fix - sanitize keys as well
|
||||||
$ret[$this->toDB($key, $nostrip, $no_encode, $mod, $original_author)] = $this->toDB($var, $nostrip, $no_encode, $mod, $original_author);
|
$ret[$this->toDB($key, $nostrip, $no_encode, $mod, $original_author)] = $this->toDB($var, $nostrip, $no_encode, $mod, $original_author);
|
||||||
}
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MAGIC_QUOTES_GPC == TRUE && $nostrip == FALSE)
|
||||||
|
{
|
||||||
|
$data = stripslashes($data);
|
||||||
|
}
|
||||||
|
if (isset($pref['post_html']) && check_class($pref['post_html']))
|
||||||
|
{
|
||||||
|
$no_encode = TRUE;
|
||||||
|
}
|
||||||
|
if (is_numeric($original_author) && !check_class($pref['post_html'], '', $original_author))
|
||||||
|
{
|
||||||
|
$no_encode = FALSE;
|
||||||
|
}
|
||||||
|
if ($no_encode === TRUE && strpos($mod, 'no_html') === FALSE)
|
||||||
|
{
|
||||||
|
$search = array('$', '"', "'", '\\', '<?');
|
||||||
|
$replace = array('$', '"', ''', '\', '<?');
|
||||||
|
$ret = str_replace($search, $replace, $data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MAGIC_QUOTES_GPC == TRUE && $nostrip == FALSE)
|
$data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
|
||||||
{
|
$data = str_replace('\\', '\', $data);
|
||||||
$data = stripslashes($data);
|
|
||||||
}
|
$ret = preg_replace("/&#(\d*?);/", "&#\\1;", $data);
|
||||||
if (isset($pref['post_html']) && check_class($pref['post_html']))
|
|
||||||
{
|
|
||||||
$no_encode = TRUE;
|
|
||||||
}
|
|
||||||
if (is_numeric($original_author) && !check_class($pref['post_html'], '', $original_author))
|
|
||||||
{
|
|
||||||
$no_encode = FALSE;
|
|
||||||
}
|
|
||||||
if ($no_encode === TRUE && strpos($mod, 'no_html') === FALSE)
|
|
||||||
{
|
|
||||||
$search = array('$', '"', "'", '\\', '<?');
|
|
||||||
$replace = array('$', '"', ''', '\', '<?');
|
|
||||||
$ret = str_replace($search, $replace, $data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
|
|
||||||
$data = str_replace('\\', '\', $data);
|
|
||||||
$ret = preg_replace("/&#(\d*?);/", "&#\\1;", $data);
|
|
||||||
}
|
|
||||||
if (strpos($mod, 'no_php') !== FALSE)
|
|
||||||
{
|
|
||||||
$ret = str_replace(array("[php]", "[/php]"), array("[php]", "[/php]"), $ret);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (strpos($mod, 'no_php') !== FALSE)
|
||||||
|
{
|
||||||
|
$ret = str_replace(array("[php]", "[/php]"), array("[php]", "[/php]"), $ret);
|
||||||
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user