@@ -276,14 +276,15 @@ public function getSortSQL()
276276
277277 public function decode ($ record )
278278 {
279+ global $ conf ;
279280 if (is_array ($ record )) {
280281 foreach ($ this ->listDef ['item ' ] as $ field ){
281282 $ key = $ field ['field ' ];
282283 if (isset ($ record [$ key ])) {
283284 switch ($ field ['datatype ' ]){
284285 case 'VARCHAR ' :
285286 case 'TEXT ' :
286- $ record [$ key ] = htmlentities (stripslashes ($ record [$ key ]));
287+ $ record [$ key ] = htmlentities (stripslashes ($ record [$ key ]), ENT_QUOTES , $ conf [ " html_content_encoding " ] );
287288 break ;
288289
289290 case 'DATE ' :
@@ -295,15 +296,15 @@ public function decode($record)
295296 break ;
296297
297298 case 'DOUBLE ' :
298- $ record [$ key ] = htmlentities ($ record [$ key ]);
299+ $ record [$ key ] = htmlentities ($ record [$ key ], ENT_QUOTES , $ conf [ " html_content_encoding " ] );
299300 break ;
300301
301302 case 'CURRENCY ' :
302303 $ record [$ key ] = number_format ($ record [$ key ], 2 , ', ' , '' );
303304 break ;
304305
305306 default :
306- $ record [$ key ] = htmlentities (stripslashes ($ record [$ key ]));
307+ $ record [$ key ] = htmlentities (stripslashes ($ record [$ key ]), ENT_QUOTES , $ conf [ " html_content_encoding " ] );
307308 }
308309 }
309310 }
@@ -362,11 +363,12 @@ function lng($msg) {
362363 }
363364
364365 function escapeArrayValues ($ search_values ) {
366+ global $ conf ;
365367
366368 $ out = array ();
367369 if (is_array ($ search_values )) {
368370 foreach ($ search_values as $ key => $ val ) {
369- $ out [$ key ] = htmlentities ($ val ,ENT_QUOTES );
371+ $ out [$ key ] = htmlentities ($ val ,ENT_QUOTES , $ conf [ " html_content_encoding " ] );
370372 }
371373 }
372374
0 commit comments