public function addMeta($key, $value, $replace = true, $escape = true)
{
$key = strtolower($key);
if (null === $value) {
unset($this->metas[$key]);
return;
}
// FIXME: If you use the i18n layer and escape the data here, it won't work
// see include_metas() in AssetHelper
if ($escape) {
$value = htmlspecialchars($value, ENT_QUOTES, $this->options['charset']);
}
$current = isset($this->metas[$key]) ? $this->metas[$key] : null;
if ($replace || !$current) {
$this->metas[$key] = $value;
}
}