mirror of https://github.com/JohnHammond/CTFd.git
Render descriptions encoded, and then decode and render with marked (#345)
parent
26a400b2f3
commit
cbdb80fa4a
|
@ -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}));
|
||||
|
|
Loading…
Reference in New Issue