mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 12:58:40 +00:00
feat: mathjax support on user_self_review page
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1b955c5913
commit
0c21b31517
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
$username = UOJContext::user()['username'];
|
$username = UOJContext::user()['username'];
|
||||||
|
|
||||||
|
$REQUIRE_LIB['mathjax'] = '';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php echoUOJPageHeader(UOJLocale::get('contests::contest self reviews')) ?>
|
<?php echoUOJPageHeader(UOJLocale::get('contests::contest self reviews')) ?>
|
||||||
@ -64,7 +65,7 @@
|
|||||||
$result .= '<td><div id="' . $problem_review_id . '"></div></td>';
|
$result .= '<td><div id="' . $problem_review_id . '"></div></td>';
|
||||||
$esc_problem_self_review = rawurlencode($problem_self_review != null ? $problem_self_review['content'] : '');
|
$esc_problem_self_review = rawurlencode($problem_self_review != null ? $problem_self_review['content'] : '');
|
||||||
$result .= '<script type="text/javascript">'
|
$result .= '<script type="text/javascript">'
|
||||||
. "$(function() { $('#$problem_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_problem_self_review}\"), $dom_sanitize_config)); });"
|
. "(function() { $('#$problem_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_problem_self_review}\"), $dom_sanitize_config)); })();"
|
||||||
. '</script>';
|
. '</script>';
|
||||||
|
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
@ -73,7 +74,7 @@
|
|||||||
$esc_contest_self_review = rawurlencode($contest_self_review != null ? $contest_self_review['content'] : '');
|
$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 .= '<td rowspan="' . $n_contest_problems . '"><div id="' . $contest_review_id . '"></div></td>';
|
||||||
$result .= '<script type="text/javascript">'
|
$result .= '<script type="text/javascript">'
|
||||||
. "$(function() { $('#$contest_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_contest_self_review}\"), $dom_sanitize_config)); });"
|
. "(function() { $('#$contest_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_contest_self_review}\"), $dom_sanitize_config)); })();"
|
||||||
. '</script>';
|
. '</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,5 +86,5 @@
|
|||||||
|
|
||||||
echoLongTable($col_names, $from, $cond, $tail, $header_row, $print_row, $config);
|
echoLongTable($col_names, $from, $cond, $tail, $header_row, $print_row, $config);
|
||||||
?>
|
?>
|
||||||
|
<script>if (window.MathJax) MathJax.typeset();</script>
|
||||||
<?php echoUOJPageFooter() ?>
|
<?php echoUOJPageFooter() ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user