diff --git a/html/inc/forum_pm.inc b/html/inc/forum_pm.inc index baef7caa57..2694240e0c 100644 --- a/html/inc/forum_pm.inc +++ b/html/inc/forum_pm.inc @@ -50,10 +50,11 @@ function pm_create_new($error = null) { } } else { $writeto = post_str("to", true); - $subject = post_str("subject", true); - $content = post_str("content", true); + $subject = stripslashes(post_str("subject", true)); + $content = stripslashes(post_str("content", true)); } + $content = htmlspecialchars($content); $subject = htmlspecialchars($subject); if ($error != null) { diff --git a/html/inc/uotd.inc b/html/inc/uotd.inc index 83b177354c..ee761b2403 100644 --- a/html/inc/uotd.inc +++ b/html/inc/uotd.inc @@ -137,13 +137,13 @@ function count_uotd_candidates(){ } else { $query = default_uotd_candidates_query(); } - + $result = mysql_query($query); if($result) { $n = mysql_num_rows($result); } mysql_free_result($result); - + return $n; }