diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index d56449231..aea72a72b 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -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)); } } }