Skip to content

Commit 01189af

Browse files
orthaghtrasher
authored andcommitted
remove xss in kb comments
1 parent 9f1117d commit 01189af

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

inc/knowbaseitem_comment.class.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,7 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtem
8282
* @param $withtemplate integer withtemplate param (default 0)
8383
**/
8484
static function showForItem(CommonDBTM $item, $withtemplate = 0) {
85-
global $DB, $CFG_GLPI;
86-
87-
$item_id = $item->getID();
88-
$item_type = $item::getType();
89-
if (isset($_GET["start"])) {
90-
$start = intval($_GET["start"]);
91-
} else {
92-
$start = 0;
93-
}
85+
global $CFG_GLPI;
9486

9587
// Total Number of comments
9688
if ($item->getType() == KnowbaseItem::getType()) {
@@ -309,9 +301,7 @@ static public function displayComments($comments, $cancomment, $level = 0) {
309301
}
310302

311303
$html .= "<div class='item_content'>";
312-
$html .= "<p>";
313-
$html .= Toolbox::unclean_cross_side_scripting_deep($comment['comment']);
314-
$html .= "</p>";
304+
$html .= "<p>{$comment['comment']}</p>";
315305
$html .= "</div>";
316306
$html .= "</div>"; // displayed_content
317307

0 commit comments

Comments
 (0)