Skip to content

Commit c49c52a

Browse files
committed
Fix #10682: Meta description and keywords transform to html entities
Changed the htmlentities function to the htmlspecialchars function. It's not necessary to do HTML encoding on all characters as described in #10682. Since the content is used within HTML tags, we still need to encode special HTML chars in order to make sure that chars like "'& etc, will not break the page.
1 parent bce891d commit c49c52a

File tree

1 file changed

+1
-1
lines changed
  • lib/internal/Magento/Framework/View/Page

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/View/Page/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function getTitle()
226226
public function setMetadata($name, $content)
227227
{
228228
$this->build();
229-
$this->metadata[$name] = htmlentities($content);
229+
$this->metadata[$name] = htmlspecialchars($content);
230230
}
231231

232232
/**

0 commit comments

Comments
 (0)