Skip to content

Commit b29b43d

Browse files
author
Oleksandr Gorkun
committed
MC-33823: Merge CE, EE and B2B changes
1 parent 8010064 commit b29b43d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ public function renderEventListenerAsTag(
103103
if (!$eventName || !$attributeJavascript || !$elementSelector || mb_strpos($eventName, 'on') !== 0) {
104104
throw new \InvalidArgumentException('Invalid JS event handler data provided');
105105
}
106-
$listenerFunction = 'eventListener' .$this->random->getRandomString(32);
107-
$elementName = 'listenedElement' .$this->random->getRandomString(32);
106+
107+
$random = $this->random->getRandomString(32);
108+
$listenerFunction = 'eventListener' .$random;
109+
$elementName = 'listenedElement' .$random;
108110
$script = <<<script
109111
function {$listenerFunction} () {
110112
{$attributeJavascript};

0 commit comments

Comments
 (0)