htmlentities -> htmlspecialchars

This commit is contained in:
2024-12-06 15:35:38 +08:00
parent daa005f029
commit d9b2d13caa
184 changed files with 410 additions and 405 deletions

View File

@@ -10,7 +10,7 @@
<div class="ui left icon input" style="width: 100%; ">
<input class="prompt" style="width: 100%; " type="text" placeholder=" <?php echo $MSG_TITLE; ?> …"
name="search" value="<?php if (isset($_GET['search']))
echo htmlentities($_GET['search'], ENT_QUOTES, 'UTF-8') ?>">
echo htmlspecialchars($_GET['search'], ENT_QUOTES, 'UTF-8') ?>">
<i class="search icon"></i>
</div>
@@ -23,7 +23,7 @@
<div class="ui search" style="width: 120px; height: 28px; margin-top: -5.3px; ">
<div class="ui icon input" style="width: 100%; ">
<input class="prompt" style="width: 100%; " type="text" placeholder="用户ID" name="query_user_id" value="<?php if (isset($_GET['query_user_id']))
echo htmlentities($_GET['query_user_id'], ENT_QUOTES, 'UTF-8') ?>">
echo htmlspecialchars($_GET['query_user_id'], ENT_QUOTES, 'UTF-8') ?>">
<i class="search icon"></i>
</div>
<div class="results" style="width: 100%; "></div>
@@ -95,7 +95,7 @@
function get_href($page, $postfix, $query_user_id)
{
return "problemset.php?page=" . $page .
htmlentities($postfix, ENT_QUOTES, 'UTF-8') .
htmlspecialchars($postfix, ENT_QUOTES, 'UTF-8') .
get_query_user_id($query_user_id);
}
?>