File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1319,6 +1319,8 @@ public function getEvents(
1319
1319
break ;
1320
1320
}
1321
1321
1322
+ $ this ->cleanEvents ();
1323
+
1322
1324
switch ($ format ) {
1323
1325
case 'json ' :
1324
1326
if (empty ($ this ->events )) {
@@ -1337,6 +1339,26 @@ public function getEvents(
1337
1339
}
1338
1340
}
1339
1341
1342
+ /**
1343
+ * Clean events
1344
+ *
1345
+ * @return bool
1346
+ */
1347
+ public function cleanEvents ()
1348
+ {
1349
+ if (empty ($ this ->events )) {
1350
+
1351
+ return false ;
1352
+ }
1353
+
1354
+ foreach ($ this ->events as &$ event ) {
1355
+ $ event ['description ' ] = Security::remove_XSS ($ event ['description ' ]);
1356
+ $ event ['title ' ] = Security::remove_XSS ($ event ['title ' ]);
1357
+ }
1358
+
1359
+ return true ;
1360
+ }
1361
+
1340
1362
/**
1341
1363
* @param int $id
1342
1364
* @param int $minute_delta
You can’t perform that action at this time.
0 commit comments