Skip to content

Commit f30af41

Browse files
author
Danilo Argentiero
committed
Issue #10645 Allow underscore charachter for BEM class via attribute tag
1 parent 320e53e commit f30af41

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
@@ -463,7 +463,7 @@ public function addRss($title, $href)
463463
*/
464464
public function addBodyClass($className)
465465
{
466-
$className = preg_replace('#[^a-z0-9-]+#', '-', strtolower($className));
466+
$className = preg_replace('#[^a-z0-9-_]+#', '-', strtolower($className));
467467
$bodyClasses = $this->getElementAttribute(self::ELEMENT_TYPE_BODY, self::BODY_ATTRIBUTE_CLASS);
468468
$bodyClasses = $bodyClasses ? explode(' ', $bodyClasses) : [];
469469
$bodyClasses[] = $className;

0 commit comments

Comments
 (0)