diff --git a/app/views/errors/gitolite.html.haml b/app/views/errors/gitolite.html.haml
index 41d7d83a1c92b2bcd43621ac7d228a186cc4c82a..ccee757378d361ff8ef5ca8c91a77bef48ddcc01 100644
--- a/app/views/errors/gitolite.html.haml
+++ b/app/views/errors/gitolite.html.haml
@@ -14,5 +14,6 @@
%p
Try:
%pre
- sudo chmod -R 770 /home/git/repositories/
- sudo chown -R git:git /home/git/repositories/
+ = preserve do
+ sudo chmod -R 770 /home/git/repositories/
+ sudo chown -R git:git /home/git/repositories/
diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml
index 14d49305a541ddc3226f22238cee8db87fe641a7..37ccd9cfb6459863c674b41a8d0ca3ee365a2cf0 100644
--- a/app/views/issues/show.html.haml
+++ b/app/views/issues/show.html.haml
@@ -42,7 +42,8 @@
- if @issue.description.present?
.bottom_box_content
- = markdown @issue.description
+ = preserve do
+ = markdown @issue.description
.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue"
diff --git a/app/views/merge_requests/_how_to_merge.html.haml b/app/views/merge_requests/_how_to_merge.html.haml
index 61b4f0aa0a35e192e83ac755ae84bfebf2382033..af81dd5b2efd63cdfc9160e1409e88ad8160f79b 100644
--- a/app/views/merge_requests/_how_to_merge.html.haml
+++ b/app/views/merge_requests/_how_to_merge.html.haml
@@ -4,11 +4,12 @@
%h3 How To Merge
.modal-body
%pre
- :erb
- git checkout <%= @merge_request.target_branch %>
- git fetch origin
- git merge origin/<%= @merge_request.source_branch %>
- git push origin <%= @merge_request.target_branch %>
+ = preserve do
+ :erb
+ git checkout <%= @merge_request.target_branch %>
+ git fetch origin
+ git merge origin/<%= @merge_request.source_branch %>
+ git push origin <%= @merge_request.target_branch %>
:javascript
diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml
index bac48aa54aff0a115497cf5e67165828f85562f5..38b198a9acb5dfb6bc051b754283243d85b90c42 100644
--- a/app/views/milestones/show.html.haml
+++ b/app/views/milestones/show.html.haml
@@ -39,7 +39,8 @@
- if @milestone.description.present?
.bottom_box_content
- = markdown @milestone.description
+ = preserve do
+ = markdown @milestone.description
:javascript
diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml
index 916fda062712d52759c884181f4e346b82e195ce..77b157386105ff4259a514d32690713e01fa8647 100644
--- a/app/views/notes/_show.html.haml
+++ b/app/views/notes/_show.html.haml
@@ -9,7 +9,8 @@
%strong= link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note btn small"
%div.note-title
- = markdown(note.note)
+ = preserve do
+ = markdown(note.note)
- if note.attachment.url
.right
%div.file
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index 249442c15b5de30da50dc4b00fca8bd94c707143..44411b715966730eaeda472e0a20ddebb4ec7a98 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -15,7 +15,8 @@
%h3 Git global setup:
- setup_str = ["git config --global user.name \"#{current_user.name}\"",
"git config --global user.email \"#{current_user.email}\""].join("\n")
- = raw bash_lexer.highlight(setup_str, :lexer => 'bash', :options => {:encoding => 'utf-8'})
+ = preserve do
+ = raw bash_lexer.highlight(setup_str, :lexer => 'bash', :options => {:encoding => 'utf-8'})
%br
%br
@@ -29,7 +30,8 @@
"git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n")
- = raw bash_lexer.highlight(repo_setup_str)
+ = preserve do
+ = raw bash_lexer.highlight(repo_setup_str)
%br
%br
@@ -37,7 +39,8 @@
- exist_repo_setup_str = ["cd existing_git_repo",
"git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n")
- = raw bash_lexer.highlight(exist_repo_setup_str)
+ = preserve do
+ = raw bash_lexer.highlight(exist_repo_setup_str)
- if can? current_user, :admin_project, @project
.alert-message.block-message.error.prepend-top-20
diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml
index 389a5a9cfb9c11c6ef85a1980c53bf31d1f42552..ee2f278693c2acda2504eadb2bb7a4b854418d31 100644
--- a/app/views/refs/_tree.html.haml
+++ b/app/views/refs/_tree.html.haml
@@ -41,7 +41,8 @@
%h3= content.name
.readme
- if content.name =~ /\.(md|markdown)$/i
- = markdown(content.data)
+ = preserve do
+ = markdown(content.data)
- else
= simple_format(content.data)
diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml
index 1b66fd3382ed188f4525616aa9d2c0cd63de67ab..8ac4994a1b3a8d62ea177b51bc52a0f9010534a1 100644
--- a/app/views/wikis/show.html.haml
+++ b/app/views/wikis/show.html.haml
@@ -8,7 +8,8 @@
Edit
%hr
.wiki_content
- = markdown_to_html @wiki.content
+ = preserve do
+ = markdown_to_html @wiki.content
%p.time Last edited by #{@wiki.user.name}, in #{time_ago_in_words @wiki.created_at}
- if can? current_user, :admin_wiki, @project