htmlentities -> htmlspecialchars
This commit is contained in:
@@ -78,7 +78,7 @@ if($ok){
|
||||
// ){
|
||||
|
||||
if($row['user_id']!=$_SESSION[$OJ_NAME.'_'.'user_id']){
|
||||
$view_mail_link= "<a href='mail.php?to_user=".htmlentities($row['user_id'],ENT_QUOTES,"UTF-8")."&title=$MSG_SUBMIT $id'>Mail the auther</a>";
|
||||
$view_mail_link= "<a href='mail.php?to_user=".htmlspecialchars($row['user_id'],ENT_QUOTES,"UTF-8")."&title=$MSG_SUBMIT $id'>Mail the auther</a>";
|
||||
}
|
||||
|
||||
$sql = "SELECT `error` FROM `runtimeinfo` WHERE `solution_id`=?";
|
||||
@@ -86,14 +86,14 @@ if($ok){
|
||||
|
||||
if(isset($result[0])){
|
||||
$row = $result[0];
|
||||
$view_reinfo=htmlentities(str_replace("\n\r","\n",$row['error']),ENT_QUOTES,"UTF-8");
|
||||
$view_reinfo=htmlspecialchars(str_replace("\n\r","\n",$row['error']),ENT_QUOTES,"UTF-8");
|
||||
}
|
||||
|
||||
if(strpos($row['error'],"judge/")!==false&&!isset($_SESSION[$OJ_NAME."_administrator"])) $view_reinfo = "潜在的数组或指针越界,请检查代码。";
|
||||
else if(strpos($row['error'],"php")!==false) $view_reinfo = "error2";
|
||||
else if(strpos($row['error'],"PASS")!==false) $view_reinfo = "error3";
|
||||
else if($OJ_SHOW_DIFF && $row && ($ok||$isRE) && ($OJ_TEST_RUN||is_valid($row['error'])||$ok)){
|
||||
$view_reinfo = htmlentities(str_replace("\n\r","\n",$row['error']),ENT_QUOTES,"UTF-8");
|
||||
$view_reinfo = htmlspecialchars(str_replace("\n\r","\n",$row['error']),ENT_QUOTES,"UTF-8");
|
||||
|
||||
$view_reinfo .="<br>$MSG_MARK:$mark";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user