Skip to content

Commit 1503f3a

Browse files
Merge forwardport of #11048 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11048.patch (created by @PieterCappelle) based on commit(s): 1. c3ea1f5 2. 0c0393d 3. 6237877 4. 202dd82 Fixed GitHub Issues in 2.3-develop branch: - #10417: Wysywig editor shows broken image icons (reported by @deadlyw1re)
2 parents bac46ce + c46acb7 commit 1503f3a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/code/Magento/Cms/Helper/Wysiwyg/Images.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,13 @@ public function getImageHtmlDeclaration($filename, $renderAsTag = false)
189189
$html = $fileUrl;
190190
} else {
191191
$directive = $this->urlEncoder->encode($directive);
192-
$html = $this->_backendData->getUrl('cms/wysiwyg/directive', ['___directive' => $directive]);
192+
$html = $this->_backendData->getUrl(
193+
'cms/wysiwyg/directive',
194+
[
195+
'___directive' => $directive,
196+
'_escape_params' => false,
197+
]
198+
);
193199
}
194200
}
195201
return $html;

app/code/Magento/Cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ public function testGetImageHtmlDeclaration($baseUrl, $fileName, $isUsingStaticU
477477

478478
$this->backendDataMock->expects($this->any())
479479
->method('getUrl')
480-
->with('cms/wysiwyg/directive', ['___directive' => $directive])
480+
->with('cms/wysiwyg/directive', ['___directive' => $directive, '_escape_params' => false])
481481
->willReturn($directive);
482482

483483
$this->assertEquals($expectedHtml, $this->imagesHelper->getImageHtmlDeclaration($fileName));

0 commit comments

Comments
 (0)