mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 19:28:41 +00:00
refactor(web/group/announcement): drop DOMPurify
This commit is contained in:
parent
8b97bdf55e
commit
1740cc8265
@ -315,11 +315,7 @@
|
||||
<b><?= $group['title'] ?></b>
|
||||
</a>
|
||||
<?php if ($group_announcement): ?>
|
||||
<div id="announcement-content-<?= $group['id'] ?>"></div>
|
||||
<script>(function(){
|
||||
$('#announcement-content-<?= $group['id'] ?>')
|
||||
.html(DOMPurify.sanitize(decodeURIComponent("<?= rawurlencode($group_announcement) ?>"), <?= DOM_SANITIZE_CONFIG ?>));
|
||||
})();</script>
|
||||
<div><?= HTML::pruifier()->purify($group_announcement) ?></div>
|
||||
<?php else: ?>
|
||||
<div>(暂无公告)</div>
|
||||
<?php endif ?>
|
||||
|
@ -17,11 +17,9 @@
|
||||
<?= $group['title'] ?>
|
||||
</a>
|
||||
<?php if ($group_announcement): ?>
|
||||
<div id="announcement-content-<?= $group['id'] ?>" class="text-break"></div>
|
||||
<script>(function(){
|
||||
$('#announcement-content-<?= $group['id'] ?>')
|
||||
.html(DOMPurify.sanitize(decodeURIComponent("<?= urlencode($group_announcement) ?>"), <?= DOM_SANITIZE_CONFIG ?>));
|
||||
})();</script>
|
||||
<div class="text-break">
|
||||
<?= HTML::pruifier()->purify($group_announcement) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div>(暂无公告)</div>
|
||||
<?php endif ?>
|
||||
|
Loading…
Reference in New Issue
Block a user