mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
e_parse small corrections, header keywords updated
This commit is contained in:
parent
bad780c356
commit
700def686f
@ -8,10 +8,8 @@
|
||||
*
|
||||
* Text processing and parsing functions
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
@ -490,38 +488,39 @@ class e_parse
|
||||
//Fix - sanitize keys as well
|
||||
$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
|
||||
{
|
||||
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
|
||||
{
|
||||
$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);
|
||||
}
|
||||
$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);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user