mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 08:18:41 +00:00
fix: DOMPurify on user self review page
This commit is contained in:
parent
db75573e1f
commit
ad9bbf9222
@ -67,7 +67,7 @@
|
||||
$result .= '<td><div id="' . $problem_review_id . '"></div></td>';
|
||||
$esc_problem_self_review = rawurlencode($problem_self_review != null ? $problem_self_review['content'] : '');
|
||||
$result .= '<script type="text/javascript">'
|
||||
. "$(function() { $('#$problem_review_id').html(DOMPurify.sanitize('{$esc_problem_self_review}', $dom_sanitize_config)); });"
|
||||
. "$(function() { $('#$problem_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_problem_self_review}\"), $dom_sanitize_config)); });"
|
||||
. '</script>';
|
||||
|
||||
if ($i == 0) {
|
||||
@ -76,7 +76,7 @@
|
||||
$esc_contest_self_review = rawurlencode($contest_self_review != null ? $contest_self_review['content'] : '');
|
||||
$result .= '<td rowspan="' . $n_contest_problems . '"><div id="' . $contest_review_id . '"></div></td>';
|
||||
$result .= '<script type="text/javascript">'
|
||||
. "$(function() { $('#$contest_review_id').html(DOMPurify.sanitize('{$esc_contest_self_review}', $dom_sanitize_config)); });"
|
||||
. "$(function() { $('#$contest_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_contest_self_review}\"), $dom_sanitize_config)); });"
|
||||
. '</script>';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user