@@ -70,6 +70,11 @@ public function convertAsForm($options, $formType)
7070 // Should we really check formType or can we just
7171 // look for query_builder option?
7272 if (preg_match ("/EntityType$/i " , $ formType )) {
73+ preg_match ("/'query_builder' => '(.+?)}',/i " , $ options , $ matches );
74+
75+ if (count ($ matches ) > 0 ) {
76+ $ options = str_replace ("'query_builder' => ' $ matches [1 ]}' " , "'query_builder' => " .stripslashes ($ matches [1 ]).'} ' , $ options );
77+ }
7378 preg_match ("/'query_builder' => '(.+?)',/i " , $ options , $ matches );
7479
7580 if (count ($ matches ) > 0 ) {
@@ -79,6 +84,11 @@ public function convertAsForm($options, $formType)
7984
8085 // Same question here
8186 if (preg_match ("/ModelType$/i " , $ formType )) {
87+ preg_match ("/'query' => '(.+?)}',/i " , $ options , $ matches );
88+
89+ if (count ($ matches ) > 0 ) {
90+ $ options = str_replace ("'query' => ' $ matches [1 ]}' " , "'query' => " .stripslashes ($ matches [1 ]).'} ' , $ options );
91+ }
8292 preg_match ("/'query' => '(.+?)',/i " , $ options , $ matches );
8393
8494 if (count ($ matches ) > 0 ) {
0 commit comments