diff --git a/modcp.php b/modcp.php
index b9ffa8f2..acd7390f 100644
--- a/modcp.php
+++ b/modcp.php
@@ -695,7 +695,7 @@ switch ($mode)
$template->assign_vars(array(
'TPL_MODCP_IP' => true,
- 'IP' => (verify_ip($ip_this_post)) ? '' . $ip_this_post . '' : $ip_this_post,
+ 'IP' => (verify_ip($ip_this_post)) ? '' . $ip_this_post . '' : htmlCHR($ip_this_post),
'U_LOOKUP_IP' => (!$no_lookup) ? "modcp.php?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=$ip_this_post&sid=" . $userdata['session_id'] : '',
));
unset($no_lookup);
@@ -734,7 +734,7 @@ switch ($mode)
$template->assign_block_vars('iprow', array(
'ROW_CLASS' => !($i % 2) ? 'row4' : 'row5',
- 'IP' => (verify_ip($ip)) ? '' . $ip . '' : $ip,
+ 'IP' => (verify_ip($ip)) ? '' . $ip . '' : htmlCHR($ip),
'POSTS' => $row['postings'],
'U_LOOKUP_IP' => (!$no_lookup) ? "modcp.php?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $ip . "&sid=" . $userdata['session_id'] : '',
));