Skip to content

Commit b69a601

Browse files
author
Ivan Gavryshko
committed
Merge remote-tracking branch 'origin/MAGETWO-45017-widget-error' into PR_Branch
2 parents 3d357ee + 8d14d48 commit b69a601

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public function getWidgetsArray($filters = [])
277277
*/
278278
public function getWidgetDeclaration($type, $params = [], $asIs = true)
279279
{
280-
$directive = '{{widget type="' . preg_quote($type) . '"';
280+
$directive = '{{widget type="' . $type . '"';
281281

282282
foreach ($params as $name => $value) {
283283
// Retrieve default option value if pre-configured

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ public function testGetWidgetByClassType()
7575
$this->assertNull($this->widget->getWidgetByClassType('type2'));
7676
}
7777

78-
public function testGetWidgetDeclarationTypeWithBackslashes()
79-
{
80-
$this->assertContains(
81-
'Magento\\\\Widget\\\\Backslashed\\\\ClassName',
82-
$this->widget->getWidgetDeclaration('Magento\Widget\Backslashed\ClassName')
83-
);
84-
}
85-
8678
public function testGetConfigAsObject()
8779
{
8880
$configFile = __DIR__ . '/_files/mappedConfigArrayAll.php';

lib/web/mage/adminhtml/wysiwyg/widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ define([
209209
var descrCnt = $('widget-description-' + this.widgetEl.selectedIndex);
210210
if(noteCnt != undefined) {
211211
var description = (descrCnt != undefined ? descrCnt.innerHTML : '');
212-
noteCnt.update(descrCnt.innerHTML);
212+
noteCnt.update(description);
213213
}
214214
},
215215

0 commit comments

Comments
 (0)