Skip to content

Commit

Permalink
url
Browse files Browse the repository at this point in the history
zhblue committed Dec 8, 2018
1 parent aea7208 commit afb7b9f
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion trunk/web/category.php
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
if(trim($cat)=="") continue;
$hash_num=hexdec(substr(md5($cat),0,15));
$label_theme=$color_theme[$hash_num%count($color_theme)];
$view_category.= "<a class='label label-$label_theme' style='display: inline-block;' href='problemset.php?search=".htmlentities($cat,ENT_QUOTES,'UTF-8')."'>".$cat."</a>&nbsp;";
$view_category.= "<a class='label label-$label_theme' style='display: inline-block;' href='problemset.php?search=".urlencode(htmlentities($cat,ENT_QUOTES,'UTF-8'))."'>".$cat."</a>&nbsp;";
}

$view_category.= "</p></div>";
4 changes: 2 additions & 2 deletions trunk/web/template/bs3/problem.php
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@
<?php
$cats=explode(" ",$row['source']);
foreach($cats as $cat){
echo "<a href='problemset.php?search=".htmlentities($cat,ENT_QUOTES,'utf-8')."'>".htmlentities($cat,ENT_QUOTES,'utf-8')."</a>&nbsp;";
echo "<a href='problemset.php?search=".urlencode(htmlentities($cat,ENT_QUOTES,'utf-8'))."'>".htmlentities($cat,ENT_QUOTES,'utf-8')."</a>&nbsp;";
}?>
</div>
</div>
@@ -221,4 +221,4 @@ function phpfm( pid ) {
</script>

</body>
</html>
</html>

0 comments on commit afb7b9f

Please sign in to comment.