diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index 51240598b..2b0f028c4 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -299,7 +299,7 @@ table.tablesorter tbody td a .issue_title { #output.formatted { width: auto; font-family: "Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace; - padding: 10px 5px; + padding: 10px 5px 0px; margin-left: 45px; } diff --git a/app/views/git/blobs/_show.html.haml b/app/views/git/blobs/_show.html.haml index cb3363e7c..aba2703b4 100644 --- a/app/views/git/blobs/_show.html.haml +++ b/app/views/git/blobs/_show.html.haml @@ -38,7 +38,7 @@ %pre#code =#{render_blob(@blob)} :preserve - #{@blob.data.encode_to_default.html_safe} + #{h(@blob.data.encode_to_default).html_safe} .both - when :binary %table.table.blob @@ -51,6 +51,6 @@
:javascript $(document).ready(function() { - //CodeMirror.runMode(document.getElementById("code").innerHTML, "#{@blob.mime_type}", - // document.getElementById("output")); + var text = $('#code').innerHTML.replace(/&/gi, '&'); + CodeMirror.runMode(text, "#{@blob.mime_type}", document.getElementById("output")); });