File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
app/code/Magento/CheckoutAgreements Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ protected function getAgreementsConfig()
103
103
: nl2br ($ this ->escaper ->escapeHtml ($ agreement ->getContent ())),
104
104
'checkboxText ' => $ isAgreementHtmlType
105
105
? $ agreement ->getCheckboxText ()
106
- : $ this ->escaper ->escapeHtml ($ agreement ->getCheckboxText ()),
106
+ : nl2br ( $ this ->escaper ->escapeHtml ($ agreement ->getCheckboxText () )),
107
107
'mode ' => $ agreement ->getMode (),
108
108
'agreementId ' => $ agreement ->getAgreementId (),
109
109
'contentHeight ' => $ agreement ->getContentHeight ()
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public function testGetConfigIfContentIsHtml(): void
98
98
'agreements ' => [
99
99
[
100
100
'content ' => $ content ,
101
- 'checkboxText ' => $ escapedCheckboxText ,
101
+ 'checkboxText ' => $ checkboxText ,
102
102
'mode ' => $ mode ,
103
103
'agreementId ' => $ agreementId ,
104
104
'contentHeight ' => $ contentHeight
@@ -122,11 +122,6 @@ public function testGetConfigIfContentIsHtml(): void
122
122
->with ($ searchCriteriaMock )
123
123
->willReturn ([$ agreement ]);
124
124
125
- $ this ->escaperMock ->expects ($ this ->once ())
126
- ->method ('escapeHtml ' )
127
- ->with ($ checkboxText )
128
- ->willReturn ($ escapedCheckboxText );
129
-
130
125
$ agreement ->expects ($ this ->once ())->method ('getIsHtml ' )->willReturn (true );
131
126
$ agreement ->expects ($ this ->once ())->method ('getContent ' )->willReturn ($ content );
132
127
$ agreement ->expects ($ this ->once ())->method ('getCheckboxText ' )->willReturn ($ checkboxText );
You can’t perform that action at this time.
0 commit comments