mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
Issue #4102 Parsing of < or >
This commit is contained in:
@@ -539,8 +539,11 @@ class e_parse extends e_parser
|
||||
}
|
||||
else // caused double-encoding of '&'
|
||||
{
|
||||
//$data = str_replace('<','<',$data);
|
||||
//$data = str_replace('>','>',$data);
|
||||
// $data = str_replace('&','&',$data);
|
||||
// $data = str_replace('<','<',$data);
|
||||
// $data = str_replace('>','>',$data);
|
||||
// $data = str_replace('&','&',$data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5323,11 +5326,20 @@ return;
|
||||
{
|
||||
if(empty($html)){ return ''; }
|
||||
|
||||
if($this->isHtml($html) === false)
|
||||
{
|
||||
$html = str_replace('<','<',$html);
|
||||
$html = str_replace('>','>',$html);
|
||||
}
|
||||
|
||||
$html = str_replace(' ', '{E_PARSER_CLEAN_HTML_NON_BREAKING_SPACE}', $html); // prevent replacement of with spaces.
|
||||
// Workaround for https://bugs.php.net/bug.php?id=76285
|
||||
// Part 1 of 2
|
||||
$html = str_replace("\n", "{E_PARSER_CLEAN_HTML_LINE_BREAK}", $html);
|
||||
|
||||
|
||||
|
||||
|
||||
if(strpos($html, "<body")===false) // HTML Fragment
|
||||
{
|
||||
$html = '<body>'.$html.'</body>';
|
||||
|
Reference in New Issue
Block a user