We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8010064 commit b29b43dCopy full SHA for b29b43d
lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -103,8 +103,10 @@ public function renderEventListenerAsTag(
103
if (!$eventName || !$attributeJavascript || !$elementSelector || mb_strpos($eventName, 'on') !== 0) {
104
throw new \InvalidArgumentException('Invalid JS event handler data provided');
105
}
106
- $listenerFunction = 'eventListener' .$this->random->getRandomString(32);
107
- $elementName = 'listenedElement' .$this->random->getRandomString(32);
+
+ $random = $this->random->getRandomString(32);
108
+ $listenerFunction = 'eventListener' .$random;
109
+ $elementName = 'listenedElement' .$random;
110
$script = <<<script
111
function {$listenerFunction} () {
112
{$attributeJavascript};
0 commit comments