Skip to content

Commit 49fa51e

Browse files
committed
escape quotes in tooltip fixes issue phpipam#11
1 parent d2e94c3 commit 49fa51e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/classes/class.Table_print.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private function print_snmp_table_content ($table, $tbody = true, $newClass = fa
187187
// set severity
188188
$severity = $this->set_severity_class ($f->severity, $newClass);
189189
// save
190-
$html[] = "<tr class='$severity tooltip2' data-id='$f->id' title='".str_replace("\n", "<br>", $f->content)."'>";
190+
$html[] = "<tr class='$severity tooltip2' data-id='$f->id' title='".str_replace("\n", "<br>", htmlspecialchars($f->content, ENT_QUOTES))."'>";
191191
// format
192192
$f = $this->format_snmp_table_content ($f, false, $newClass);
193193
// loop
@@ -765,4 +765,4 @@ public function print_add_item ($script, $target_table, $text = "Create new", $i
765765
}
766766

767767

768-
?>
768+
?>

0 commit comments

Comments
 (0)