mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 06:24:23 +01:00
Render descriptions encoded, and then decode and render with marked (#345)
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<span class='label label-primary chal-tag'>{{this}}</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="chal-desc">{{{ desc }}}</span>
|
||||
<span class="chal-desc">{{ desc }}</span>
|
||||
<div class="chal-hints file-row row">
|
||||
{{#each hints}}
|
||||
<div class='col-md-12 file-button-wrapper text-center'>
|
||||
|
||||
@@ -23,5 +23,7 @@ $(".input-field").bind({
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $('.chal-desc').text();
|
||||
var decoded = $('<textarea/>').html(content).val()
|
||||
|
||||
$('.chal-desc').html(marked($('.chal-desc').html(), {'gfm':true, 'breaks':true}));
|
||||
$('.chal-desc').html(marked(content, {'gfm':true, 'breaks':true}));
|
||||
|
||||
Reference in New Issue
Block a user