Skip to content

Commit 38569b3

Browse files
committed
PB-182: PB-69 Story Bug: SQL Error for Special Characters
1 parent b92b71a commit 38569b3

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

app/code/Magento/PageBuilder/view/adminhtml/ui_component/pagebuilder_products_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
<link name="condition_operator">${ $.provider }:data.sku-condition_operator</link>
156156
</exports>
157157
<notice translate="true">Comma separated product SKUs.</notice>
158+
<elementTmpl>Magento_PageBuilder/form/element/input-no-maxlength</elementTmpl>
158159
</settings>
159160
</field>
160161
<htmlContent name="conditions_form" sortOrder="5" template="Magento_PageBuilder/form/element/widget-conditions">

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/products/mass-converter/widget-directive.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<input class="admin__control-text" type="text"
8+
data-bind="
9+
event: {change: userChanges},
10+
value: value,
11+
hasFocus: focused,
12+
valueUpdate: valueUpdate,
13+
attr: {
14+
name: inputName,
15+
placeholder: placeholder,
16+
'aria-describedby': noticeId,
17+
id: uid,
18+
disabled: disabled
19+
}"/>

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/products/mass-converter/widget-directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class WidgetDirective extends BaseWidgetDirective {
3030
data.products_count = attributes.products_count;
3131
data.sort_order = attributes.sort_order;
3232
data.condition_option = attributes.condition_option;
33-
data[data.condition_option] = attributes.condition_option_value;
33+
data[data.condition_option] = this.decodeWysiwygCharacters(attributes.condition_option_value || "");
3434
data.conditions_encoded = this.decodeWysiwygCharacters(attributes.conditions_encoded || "");
3535
data[data.condition_option + "_source"] = data.conditions_encoded;
3636
return data;
@@ -53,7 +53,7 @@ export default class WidgetDirective extends BaseWidgetDirective {
5353
products_count: data.products_count,
5454
sort_order: data.sort_order,
5555
condition_option: data.condition_option,
56-
condition_option_value: data[data.condition_option],
56+
condition_option_value: this.encodeWysiwygCharacters(data[data.condition_option] || ""),
5757
type_name: "Catalog Products List",
5858
conditions_encoded: this.encodeWysiwygCharacters(data.conditions_encoded || ""),
5959
};

0 commit comments

Comments
 (0)