File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 32
32
use GlpiPlugin \Formcreator \Exception \ImportFailureException ;
33
33
use GlpiPlugin \Formcreator \Exception \ExportFailureException ;
34
34
use Glpi \Application \View \TemplateRenderer ;
35
+ use Glpi \Toolbox \Sanitizer ;
35
36
36
37
if (!defined ('GLPI_ROOT ' )) {
37
38
die ("Sorry. You can't access this file directly " );
@@ -666,7 +667,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
666
667
];
667
668
foreach ($ changeFields as $ changeField ) {
668
669
$ data [$ changeField ] = $ this ->prepareTemplate (
669
- $ this ->fields [$ changeField ] ?? '' ,
670
+ Sanitizer:: unsanitize ( __ ( $ this ->fields [$ changeField ], $ domain )) ?? '' ,
670
671
$ formanswer ,
671
672
$ changeField == 'content ' // only content supports rich text
672
673
);
Original file line number Diff line number Diff line change 32
32
use GlpiPlugin \Formcreator \Exception \ImportFailureException ;
33
33
use GlpiPlugin \Formcreator \Exception \ExportFailureException ;
34
34
use Glpi \Application \View \TemplateRenderer ;
35
+ use Glpi \Toolbox \Sanitizer ;
35
36
36
37
if (!defined ('GLPI_ROOT ' )) {
37
38
die ("Sorry. You can't access this file directly " );
@@ -185,7 +186,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
185
186
];
186
187
foreach ($ problemFields as $ problemFields ) {
187
188
$ data [$ problemFields ] = $ this ->prepareTemplate (
188
- $ this ->fields [$ problemFields ] ?? '' ,
189
+ Sanitizer:: unsanitize ( __ ( $ this ->fields [$ problemFields ], $ domain )) ?? '' ,
189
190
$ formanswer ,
190
191
$ problemFields == 'content ' // only content supports rich text
191
192
);
Original file line number Diff line number Diff line change 32
32
use GlpiPlugin \Formcreator \Exception \ImportFailureException ;
33
33
use GlpiPlugin \Formcreator \Exception \ExportFailureException ;
34
34
use Glpi \Application \View \TemplateRenderer ;
35
+ use Glpi \Toolbox \Sanitizer ;
35
36
36
37
if (!defined ('GLPI_ROOT ' )) {
37
38
die ("Sorry. You can't access this file directly " );
@@ -824,7 +825,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
824
825
$ data ['date ' ] = $ _SESSION ['glpi_currenttime ' ];
825
826
826
827
$ data ['content ' ] = $ this ->prepareTemplate (
827
- $ this ->fields ['content ' ] ?? '' ,
828
+ Sanitizer:: unsanitize ( __ ( $ this ->fields ['content ' ], $ domain )) ?? '' ,
828
829
$ formanswer ,
829
830
$ richText
830
831
);
You can’t perform that action at this time.
0 commit comments