From c2f2f7b009dcddac506e659c7864c50909c1bd47 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 21 Jan 2015 12:22:29 -0700 Subject: [PATCH] fix for quotes in metadata --- system/src/Grav/Common/Page/Page.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)); } } }