diff --git a/modules/viste/edit.php b/modules/viste/edit.php
index 717c6381d..332e48016 100644
--- a/modules/viste/edit.php
+++ b/modules/viste/edit.php
@@ -146,7 +146,7 @@ if (!empty($options) && $options != 'custom') {
- {[ "type": "textarea", "label": "'.tr('Query prevista').'", "name": "query['.$key.']", "value": "'.$field['query'].'"';
+ {[ "type": "textarea", "label": "'.tr('Query prevista').'", "name": "query['.$key.']", "value": "'.str_replace( '"', '\"', $field['query'] ).'"';
if (!$editable) {
echo ', "readonly": "1"';
}