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