fix for quotes in metadata

This commit is contained in:
Andy Miller
2015-01-21 12:22:29 -07:00
parent c2c5afbb05
commit c2f2f7b009

View File

@@ -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));
}
}
}