mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 23:58:41 +00:00
This commit is contained in:
parent
a4786d1395
commit
0d5f22cc06
@ -41,7 +41,7 @@
|
|||||||
<?php $motto_id = uniqid("motto-{$user['username']}-"); ?>
|
<?php $motto_id = uniqid("motto-{$user['username']}-"); ?>
|
||||||
<div class="card-text" id="<?= $motto_id ?>"></div>
|
<div class="card-text" id="<?= $motto_id ?>"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() { $('#<?= $motto_id ?>').html(DOMPurify.sanitize(decodeURIComponent("<?= urlencode($user['motto']) ?>"), <?= DOM_SANITIZE_CONFIG ?>)); });
|
$(function() { $('#<?= $motto_id ?>').html(DOMPurify.sanitize(decodeURIComponent("<?= rawurlencode($user['motto']) ?>"), <?= DOM_SANITIZE_CONFIG ?>)); });
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
@ -199,13 +199,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<h4 class="list-group-item-heading"><?= UOJLocale::get('motto') ?></h4>
|
<h4 class="list-group-item-heading"><?= UOJLocale::get('motto') ?></h4>
|
||||||
<?php
|
<?php $motto_id = uniqid("motto-{$user['username']}-"); ?>
|
||||||
$motto_id = uniqid("motto-{$user['username']}-");
|
|
||||||
$dom_sanitize_config = DOM_SANITIZE_CONFIG;
|
|
||||||
?>
|
|
||||||
<p class="list-group-item-text" id="<?= $motto_id ?>"></p>
|
<p class="list-group-item-text" id="<?= $motto_id ?>"></p>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() { $('#<?= $motto_id ?>').html(DOMPurify.sanitize('<?= addslashes($user['motto']) ?>', <?= $dom_sanitize_config ?>)); });
|
$(function() { $('#<?= $motto_id ?>').html(DOMPurify.sanitize('<?= addslashes($user['motto']) ?>', <?= DOM_SANITIZE_CONFIG ?>)); });
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1347,10 +1347,10 @@ function echoRanklist($config = array()) {
|
|||||||
echo '<td>' . getUserLink($user['username']) . '</td>';
|
echo '<td>' . getUserLink($user['username']) . '</td>';
|
||||||
$motto_id = uniqid("motto-{$user['username']}-");
|
$motto_id = uniqid("motto-{$user['username']}-");
|
||||||
echo "<td id=\"$motto_id\"></td>";
|
echo "<td id=\"$motto_id\"></td>";
|
||||||
$motto = addslashes($user['motto']);
|
$motto = rawurlencode($user['motto']);
|
||||||
$dom_sanitize_config = DOM_SANITIZE_CONFIG;
|
$dom_sanitize_config = DOM_SANITIZE_CONFIG;
|
||||||
echo '<script type="text/javascript">';
|
echo '<script type="text/javascript">';
|
||||||
echo "$(function() { $('#$motto_id').html(DOMPurify.sanitize('{$motto}', $dom_sanitize_config)); });";
|
echo "$(function() { $('#$motto_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$motto}\"), $dom_sanitize_config)); });";
|
||||||
echo '</script>';
|
echo '</script>';
|
||||||
echo '<td>' . $user['ac_num'] . '</td>';
|
echo '<td>' . $user['ac_num'] . '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
@ -318,7 +318,7 @@
|
|||||||
<div id="announcement-content-<?= $group['id'] ?>"></div>
|
<div id="announcement-content-<?= $group['id'] ?>"></div>
|
||||||
<script>(function(){
|
<script>(function(){
|
||||||
$('#announcement-content-<?= $group['id'] ?>')
|
$('#announcement-content-<?= $group['id'] ?>')
|
||||||
.html(DOMPurify.sanitize(decodeURIComponent("<?= urlencode($group_announcement) ?>"), <?= DOM_SANITIZE_CONFIG ?>));
|
.html(DOMPurify.sanitize(decodeURIComponent("<?= rawurlencode($group_announcement) ?>"), <?= DOM_SANITIZE_CONFIG ?>));
|
||||||
})();</script>
|
})();</script>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div>(暂无公告)</div>
|
<div>(暂无公告)</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user