htmlentities -> htmlspecialchars
This commit is contained in:
@@ -61,7 +61,7 @@ foreach ($result as $row) {
|
||||
$label_theme = $color_theme[$hash_num%count($color_theme)]; //$color_theme 在 const.inc.php 里
|
||||
if ($label_theme=="")
|
||||
$label_theme = "default";
|
||||
$view_problemset[$i][3] .= "<a title='".htmlentities($cat,ENT_QUOTES,'UTF-8')."' class='label label-$label_theme' style='display: inline-block;' href='problemset.php?search=".htmlentities(urlencode($cat),ENT_QUOTES,'UTF-8')."'>".mb_substr($cat,0,10,'utf8')."</a> ";
|
||||
$view_problemset[$i][3] .= "<a title='".htmlspecialchars($cat,ENT_QUOTES,'UTF-8')."' class='label label-$label_theme' style='display: inline-block;' href='problemset.php?search=".htmlspecialchars(urlencode($cat),ENT_QUOTES,'UTF-8')."'>".mb_substr($cat,0,10,'utf8')."</a> ";
|
||||
}
|
||||
|
||||
$view_problemset[$i][3] .= "</div >";
|
||||
@@ -116,7 +116,7 @@ foreach ($result as $row) {
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM contest WHERE contest.defunct='N' $wheremy ORDER BY contest_id DESC";
|
||||
//echo htmlentities($sql);
|
||||
//echo htmlspecialchars($sql);
|
||||
$result = pdo_query($sql);
|
||||
$view_contest=array();
|
||||
foreach ($result as $row) {
|
||||
|
||||
Reference in New Issue
Block a user