File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3232use GlpiPlugin \Formcreator \Exception \ImportFailureException ;
3333use GlpiPlugin \Formcreator \Exception \ExportFailureException ;
3434use Glpi \Application \View \TemplateRenderer ;
35+ use Glpi \Toolbox \Sanitizer ;
3536
3637if (!defined ('GLPI_ROOT ' )) {
3738 die ("Sorry. You can't access this file directly " );
@@ -666,7 +667,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
666667 ];
667668 foreach ($ changeFields as $ changeField ) {
668669 $ data [$ changeField ] = $ this ->prepareTemplate (
669- $ this ->fields [$ changeField ] ?? '' ,
670+ Sanitizer:: unsanitize ( __ ( $ this ->fields [$ changeField ], $ domain )) ?? '' ,
670671 $ formanswer ,
671672 $ changeField == 'content ' // only content supports rich text
672673 );
Original file line number Diff line number Diff line change 3232use GlpiPlugin \Formcreator \Exception \ImportFailureException ;
3333use GlpiPlugin \Formcreator \Exception \ExportFailureException ;
3434use Glpi \Application \View \TemplateRenderer ;
35+ use Glpi \Toolbox \Sanitizer ;
3536
3637if (!defined ('GLPI_ROOT ' )) {
3738 die ("Sorry. You can't access this file directly " );
@@ -185,7 +186,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
185186 ];
186187 foreach ($ problemFields as $ problemFields ) {
187188 $ data [$ problemFields ] = $ this ->prepareTemplate (
188- $ this ->fields [$ problemFields ] ?? '' ,
189+ Sanitizer:: unsanitize ( __ ( $ this ->fields [$ problemFields ], $ domain )) ?? '' ,
189190 $ formanswer ,
190191 $ problemFields == 'content ' // only content supports rich text
191192 );
Original file line number Diff line number Diff line change 3232use GlpiPlugin \Formcreator \Exception \ImportFailureException ;
3333use GlpiPlugin \Formcreator \Exception \ExportFailureException ;
3434use Glpi \Application \View \TemplateRenderer ;
35+ use Glpi \Toolbox \Sanitizer ;
3536
3637if (!defined ('GLPI_ROOT ' )) {
3738 die ("Sorry. You can't access this file directly " );
@@ -824,7 +825,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
824825 $ data ['date ' ] = $ _SESSION ['glpi_currenttime ' ];
825826
826827 $ data ['content ' ] = $ this ->prepareTemplate (
827- $ this ->fields ['content ' ] ?? '' ,
828+ Sanitizer:: unsanitize ( __ ( $ this ->fields ['content ' ], $ domain )) ?? '' ,
828829 $ formanswer ,
829830 $ richText
830831 );
You can’t perform that action at this time.
0 commit comments