mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 14:08:42 +00:00
refactor(web/user/info): drop DOMPurify
This commit is contained in:
parent
1383580a8b
commit
8b97bdf55e
@ -59,11 +59,7 @@
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item-heading"><?= UOJLocale::get('motto') ?></h4>
|
||||
<?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 ?>)); });
|
||||
</script>
|
||||
<div class="list-group-item-text"><?= HTML::pruifier()->purify($user['motto']) ?></div>
|
||||
</div>
|
||||
|
||||
<?php if (isSuperUser($myUser)): ?>
|
||||
|
@ -81,11 +81,9 @@ function fTime($time, $gran = -1) {
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</h3>
|
||||
<?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("<?= rawurlencode($user['motto']) ?>"), <?= DOM_SANITIZE_CONFIG ?>)); });
|
||||
</script>
|
||||
<div class="card-text">
|
||||
<?= HTML::pruifier()->purify($user['motto']) ?>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php if ($user['realname']): ?>
|
||||
|
Loading…
Reference in New Issue
Block a user