Skip to content

Commit

Permalink
MAGETWO-48511: [GitHub] HTML tags inside the Meta Description on Edit…
Browse files Browse the repository at this point in the history
… Product Admin page brake the Storefront PDP layout #1514 #2613 #3090 #3244 #3255 #3813 #4031 #4073
  • Loading branch information
rganin committed Apr 21, 2016
1 parent a4dd876 commit 1700f7c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/internal/Magento/Framework/View/Page/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function getTitle()
public function setMetadata($name, $content)
{
$this->build();
$this->metadata[$name] = $content;
$this->metadata[$name] = $this->prepareMetaTagContent($content);
}

/**
Expand Down Expand Up @@ -338,6 +338,17 @@ public function setKeywords($keywords)
$this->setMetadata('keywords', $keywords);
}

/**
* Prepare content for meta tag attribute
*
* @param $content
* @return string
*/
protected function prepareMetaTagContent($content)
{
return htmlentities($content);
}

/**
* Retrieve content for keywords tag
*
Expand Down

0 comments on commit 1700f7c

Please sign in to comment.