mirror of
https://github.com/getgrav/grav.git
synced 2026-02-22 14:38:13 +01:00
fix for quotes in metadata
This commit is contained in:
@@ -881,14 +881,14 @@ class Page
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $property => $prop_value) {
|
||||
$prop_key = $key.":".$property;
|
||||
$this->metadata[$prop_key] = array('property'=>$prop_key, 'content'=>$prop_value);
|
||||
$this->metadata[$prop_key] = array('property'=>$prop_key, 'content'=>htmlspecialchars($prop_value, ENT_HTML5));
|
||||
}
|
||||
// If it this is a standard meta data type
|
||||
} else {
|
||||
if (in_array($key, $header_tag_http_equivs)) {
|
||||
$this->metadata[$key] = array('http_equiv'=>$key, 'content'=>$value);
|
||||
$this->metadata[$key] = array('http_equiv'=>$key, 'content'=>htmlspecialchars($value, ENT_HTML5));
|
||||
} else {
|
||||
$this->metadata[$key] = array('name'=>$key, 'content'=>$value);
|
||||
$this->metadata[$key] = array('name'=>$key, 'content'=>htmlspecialchars($value, ENT_HTML5));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user