diff --git a/admin/view/javascript/d_visual_designer/d_visual_designer.js b/admin/view/javascript/d_visual_designer/d_visual_designer.js index b5d70fb1..b6d05b15 100644 --- a/admin/view/javascript/d_visual_designer/d_visual_designer.js +++ b/admin/view/javascript/d_visual_designer/d_visual_designer.js @@ -990,9 +990,9 @@ var d_visual_designer = { var array_values = this.convert(name, value); for (var key2 in array_values) { - name = key2.replace('][', ':'); - name = name.replace('[', '::'); - name = name.replace(']', ''); + name = key2.replace(/\]\[/g, ':'); + name = name.replace(/\[/g, '::'); + name = name.replace(/\]/g, ''); if (array_values[key2].length > 0) { shortcode += ' ' + name + '=\'' + this.escape(array_values[key2]) + '\'' + ' '; } diff --git a/catalog/view/theme/default/javascript/d_visual_designer.js b/catalog/view/theme/default/javascript/d_visual_designer.js index e9833456..2542f37a 100644 --- a/catalog/view/theme/default/javascript/d_visual_designer.js +++ b/catalog/view/theme/default/javascript/d_visual_designer.js @@ -963,9 +963,9 @@ var d_visual_designer = { var array_values = this.convert(name, value); for (var key2 in array_values){ - name = key2.replace('][',':'); - name = name.replace('[','::'); - name = name.replace(']',''); + name = key2.replace(/\]\[/g, ':'); + name = name.replace(/\[/g, '::'); + name = name.replace(/\]/g, ''); shortcode+= ' '+name+'=\''+this.escape(array_values[key2])+'\''+' '; } }