File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
view/frontend/templates/product Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -95,11 +95,11 @@ public function getProductName(): string
95
95
}
96
96
97
97
/**
98
- * Returns breadcrumb json.
98
+ * Returns breadcrumb json with html escaped names
99
99
*
100
100
* @return string
101
101
*/
102
- public function getJsonConfiguration () : string
102
+ public function getJsonConfigurationHtmlEscaped () : string
103
103
{
104
104
return json_encode (
105
105
[
@@ -112,4 +112,15 @@ public function getJsonConfiguration() : string
112
112
JSON_HEX_TAG
113
113
);
114
114
}
115
+
116
+ /**
117
+ * Returns breadcrumb json.
118
+ *
119
+ * @return string
120
+ * @deprecated in favor of new method with name {suffix}Html{postfix}()
121
+ */
122
+ public function getJsonConfiguration ()
123
+ {
124
+ return $ this ->getJsonConfigurationHtmlEscaped ();
125
+ }
115
126
}
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ $viewModel = $block->getData('viewModel');
10
10
<div class="breadcrumbs"></div>
11
11
<script type="text/x-magento-init">
12
12
{
13
- ".breadcrumbs": <?= $ viewModel ->getJsonConfiguration () ?>
13
+ ".breadcrumbs": <?= $ viewModel ->getJsonConfigurationHtmlEscaped () ?>
14
14
}
15
15
</script>
You can’t perform that action at this time.
0 commit comments