@@ -448,7 +448,7 @@ public static function displayAnnouncement($id)
448
448
return '' ;
449
449
}
450
450
451
- $ title = $ announcement ->getTitle ();
451
+ $ title = Security:: remove_XSS ( $ announcement ->getTitle () );
452
452
$ content = $ announcement ->getContent ();
453
453
454
454
$ html .= "<table height= \"100 \" width= \"100% \" cellpadding= \"5 \" cellspacing= \"0 \" class= \"table table-hover table-striped data_table \"> " ;
@@ -471,7 +471,9 @@ public static function displayAnnouncement($id)
471
471
Display::return_icon ($ image_visibility .'.png ' , $ alt_visibility , '' , ICON_SIZE_SMALL )."</a> " ;
472
472
473
473
if (api_is_allowed_to_edit (false , true )) {
474
- $ modify_icons .= "<a href= \"" .api_get_self ()."? " .api_get_cidreq ()."&action=delete&id= " .$ id ."&sec_token= " .$ stok ."\" onclick= \"javascript:if(!confirm(' " .addslashes (api_htmlentities (get_lang ('ConfirmYourChoice ' ), ENT_QUOTES , $ charset ))."')) return false; \"> " .
474
+ $ modify_icons .= "<a
475
+ href= \"" .api_get_self ()."? " .api_get_cidreq ()."&action=delete&id= " .$ id ."&sec_token= " .$ stok ."\"
476
+ onclick= \"javascript:if(!confirm(' " .addslashes (api_htmlentities (get_lang ('ConfirmYourChoice ' ), ENT_QUOTES , $ charset ))."')) return false; \"> " .
475
477
Display::return_icon ('delete.png ' , get_lang ('Delete ' ), '' , ICON_SIZE_SMALL ).
476
478
"</a> " ;
477
479
}
@@ -514,7 +516,7 @@ public static function displayAnnouncement($id)
514
516
$ html .= '<br/> ' ;
515
517
$ html .= Display::return_icon ('attachment.gif ' , get_lang ('Attachment ' ));
516
518
$ html .= '<a href=" ' .$ full_file_name .' "> ' .$ user_filename .' </a> ' ;
517
- $ html .= ' - <span class="forum_attach_comment" > ' .$ attachment_list ['comment ' ].'</span> ' ;
519
+ $ html .= ' - <span class="forum_attach_comment" > ' .Security:: remove_XSS ( $ attachment_list ['comment ' ]) .'</span> ' ;
518
520
if (api_is_allowed_to_edit (false , true )) {
519
521
$ url = api_get_self ()."? " .api_get_cidreq ().
520
522
"&action=delete_attachment&id_attach= " .$ attachment_list ['id ' ]."&sec_token= " .$ stok ;
0 commit comments