From cbdb80fa4a3fc3676ca557aa5818e23d7ec352f3 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Wed, 9 Aug 2017 14:12:34 -0400 Subject: [PATCH] Render descriptions encoded, and then decode and render with marked (#345) --- .../challenges/standard/standard-challenge-modal.hbs | 2 +- .../challenges/standard/standard-challenge-script.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-modal.hbs b/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-modal.hbs index b833fa4b..06a00310 100644 --- a/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-modal.hbs +++ b/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-modal.hbs @@ -19,7 +19,7 @@ {{this}} {{/each}} - {{{ desc }}} + {{ desc }}
{{#each hints}}
diff --git a/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-script.js b/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-script.js index 8ee657ab..7442f3d4 100644 --- a/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-script.js +++ b/CTFd/themes/original/static/js/templates/challenges/standard/standard-challenge-script.js @@ -23,5 +23,7 @@ $(".input-field").bind({ } } }); +var content = $('.chal-desc').text(); +var decoded = $('