Skip to content

Commit

Permalink
🐛 修复搜索的xss风险
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Jun 14, 2023
1 parent 02f2f65 commit ea55b8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ function pk_breadcrumbs()
$out .= '<li class="breadcrumb-item active " aria-current="page">' . __('文章列表', PUOCK) . '</li>';
}
} else if (is_search()) {
$out .= '<li class="breadcrumb-item active " aria-current="page">' . ($_GET['s']) . '</li>';
$out .= '<li class="breadcrumb-item active " aria-current="page">' . (esc_html($_GET['s'])) . '</li>';
$out .= '<li class="breadcrumb-item active " aria-current="page">' . __('搜索结果', PUOCK) . '</li>';
} else if (is_author()) {
$out .= '<li class="breadcrumb-item active " aria-current="page">' . get_the_author_meta('nickname') . '</li>';
Expand Down

0 comments on commit ea55b8f

Please sign in to comment.