mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 19:44:09 +02:00
Fix for <title> tag containing single or double quotes. Tests added.
This commit is contained in:
@@ -4473,8 +4473,14 @@ class eResponse
|
||||
$meta = '_' . $meta;
|
||||
if(isset($this->$meta) && !empty($content))
|
||||
{
|
||||
$content = str_replace(array('&', '"', "'"), array('&', '', ''), $content);
|
||||
$this->{$meta}[] = htmlspecialchars((string) $content, ENT_QUOTES, 'UTF-8');
|
||||
$content = str_replace('&', '&', $content);
|
||||
|
||||
if($meta !== '_e_PAGETITLE')
|
||||
{
|
||||
$content = htmlspecialchars((string) $content, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
$this->{$meta}[] = $content;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
@@ -4518,6 +4524,8 @@ class eResponse
|
||||
$this->_e_PAGETITLE = array();
|
||||
}
|
||||
|
||||
$title = str_replace([''','''], "'", $title);
|
||||
|
||||
return $this->addMetaData('e_PAGETITLE', $title);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user