Skip to content

Commit

Permalink
MAGETWO-80230: Fix #10417 #11048
Browse files Browse the repository at this point in the history
  • Loading branch information
vrann committed Oct 4, 2017
2 parents c640aba + 9c21120 commit 097ca09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/code/Magento/Cms/Helper/Wysiwyg/Images.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,14 @@ public function getImageHtmlDeclaration($filename, $renderAsTag = false)
$html = $fileurl; // $mediaPath;
} else {
$directive = $this->urlEncoder->encode($directive);
$html = $this->_backendData->getUrl('cms/wysiwyg/directive', ['___directive' => $directive]);

$html = $this->_backendData->getUrl(
'cms/wysiwyg/directive',
[
'___directive' => $directive,
'_escape_params' => false,
]
);
}
}
return $html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public function testGetImageHtmlDeclaration($baseUrl, $fileName, $isUsingStaticU

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

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

0 comments on commit 097ca09

Please sign in to comment.