Mercurial > zeropaste
diff app/assets/javascripts/init.tabs.js @ 124:4a8cefa814f1
Options for marked (enabling sanitize).
author | Edho Arief <edho@myconan.net> |
---|---|
date | Mon, 12 Nov 2012 15:33:11 +0700 |
parents | 5b58b0d6841c |
children | 64f73525503b |
line wrap: on
line diff
--- a/app/assets/javascripts/init.tabs.js Mon Nov 12 15:27:10 2012 +0700 +++ b/app/assets/javascripts/init.tabs.js Mon Nov 12 15:33:11 2012 +0700 @@ -2,6 +2,11 @@ if ($('#paste-tabs').length == 1) { raw = $('#plain pre').text(); + marked.setOptions({ + gfm: true, + pedantic: false, + sanitize: true + }); $('#markdown div').html(marked(raw)); $('#markdown div pre').addClass('prettyprint'); $('#markdown div a').prop('rel', 'nofollow');