Skip to content

Commit 2ff00cb

Browse files
committed
AC-9831: Block template render enhancement
1 parent 06c7b19 commit 2ff00cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/View/Element/AbstractBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,10 @@ public function getCacheKeyInfo()
10481048
public function getCacheKey()
10491049
{
10501050
if ($this->hasData('cache_key')) {
1051-
if (!preg_match('/^[a-fA-F0-9]{64}$/', $this->getData('cache_key'))) {
1051+
if (preg_match('/[^a-z0-9\-\_]/', $this->getData('cache_key'))) {
10521052
throw new \Magento\Framework\Exception\LocalizedException(
10531053
__(
1054-
'Please enter cache key with only alphanumeric characters.'
1054+
'Please enter cache key with only alphanumeric or hash string.'
10551055
)
10561056
);
10571057
}

0 commit comments

Comments
 (0)