Render descriptions encoded, and then decode and render with marked (#345)

selenium-screenshot-testing
Kevin Chung 2017-08-09 14:12:34 -04:00 committed by GitHub
parent 26a400b2f3
commit cbdb80fa4a
2 changed files with 4 additions and 2 deletions

View File

@ -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'>

View File

@ -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}));