We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 491bca4 commit 95d4ce9Copy full SHA for 95d4ce9
Twig/Extension/FormExtension.php
@@ -71,7 +71,7 @@ public function export_for_js($var)
71
}
72
73
if (is_string($var) && !preg_match($functionPattern, $var) && !preg_match($jsonPattern, $var) && !preg_match($arrayPattern, $var)) {
74
- return '"'.$var.'"';
+ return '"'.str_replace('"', '"', $var).'"';
75
76
77
if (is_array($var)) {
0 commit comments