Skip to content

Commit

Permalink
urlencode
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue committed Aug 11, 2021
1 parent ad9871c commit 416f01d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trunk/web/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$hash_num=hexdec(substr(md5($cat),0,7));
$label_theme=$color_theme[$hash_num%count($color_theme)];
if($label_theme=="") $label_theme="default";
$view_category.= "<a class='label label-$label_theme' style='display: inline-block;' href='problemset.php?search=".(htmlentities($cat,ENT_QUOTES,'UTF-8'))."'>".htmlentities($cat,ENT_QUOTES,'utf-8')."</a>&nbsp;";
$view_category.= "<a class='label label-$label_theme' style='display: inline-block;' href='problemset.php?search=".(rawurlencode($cat))."'>".htmlentities($cat,ENT_QUOTES,'utf-8')."</a>&nbsp;";

}

Expand Down
2 changes: 1 addition & 1 deletion trunk/web/problem.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$id = intval($_GET['id']);
//require("oj-header.php");

$sql="select c.contest_id,c.title from contest c inner join contest_problem cp on c.private=1 and c.contest_id=cp.contest_id and cp.problem_id=? ";
$sql="select c.contest_id,c.title from contest c inner join contest_problem cp on c.contest_id=cp.contest_id and cp.problem_id=? ";
$used_in_contests=pdo_query($sql,$id);

if (isset($_SESSION[$OJ_NAME.'_'.'administrator']) || isset($_SESSION[$OJ_NAME.'_'.'contest_creator']) || isset($_SESSION[$OJ_NAME.'_'.'problem_editor']))
Expand Down

0 comments on commit 416f01d

Please sign in to comment.