Skip to content

Commit

Permalink
Issue #10645 Allow underscore charachter for BEM class via attribute tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Danilo Argentiero committed Aug 25, 2017
1 parent 320e53e commit f30af41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/View/Page/Config.php
Expand Up @@ -463,7 +463,7 @@ public function addRss($title, $href)
*/
public function addBodyClass($className)
{
$className = preg_replace('#[^a-z0-9-]+#', '-', strtolower($className));
$className = preg_replace('#[^a-z0-9-_]+#', '-', strtolower($className));
$bodyClasses = $this->getElementAttribute(self::ELEMENT_TYPE_BODY, self::BODY_ATTRIBUTE_CLASS);
$bodyClasses = $bodyClasses ? explode(' ', $bodyClasses) : [];
$bodyClasses[] = $className;
Expand Down

0 comments on commit f30af41

Please sign in to comment.