Skip to content

Commit 6b201b2

Browse files
committed
MAGETWO-85683: Apostrophe displays as code in the text field box
- Widget fix - Widget unit test fix
1 parent d14510f commit 6b201b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Widget/Model/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function getWidgetDeclaration($type, $params = [], $asIs = true)
315315
}
316316
}
317317
if (isset($value)) {
318-
$directive .= sprintf(' %s="%s"', $name, $this->escaper->escapeQuote($value));
318+
$directive .= sprintf(' %s="%s"', $name, $this->escaper->escapeHtmlAttr($value, false));
319319
}
320320
}
321321

app/code/Magento/Widget/Test/Unit/Model/WidgetTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function testGetWidgetDeclaration()
175175
$this->conditionsHelper->expects($this->once())->method('encode')->with($conditions)
176176
->willReturn('encoded-conditions-string');
177177
$this->escaperMock->expects($this->atLeastOnce())
178-
->method('escapeQuote')
178+
->method('escapeHtmlAttr')
179179
->willReturnMap([
180180
['my "widget"', false, 'my "widget"'],
181181
['1', false, '1'],

0 commit comments

Comments
 (0)