Commit 981deddfcee1cf01efcf257dad9dae79ab05ca67
Exists in
spb-stable
and in
3 other branches
Merge branch 'highlight_html_escape' into 'master'
Enable html_escape for code blocks highlighted in markdown Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/94
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/redcarpet/render/gitlab_html.rb
| ... | ... | @@ -24,7 +24,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML |
| 24 | 24 | |
| 25 | 25 | <div class="highlighted-data #{h.user_color_scheme_class}"> |
| 26 | 26 | <div class="highlight"> |
| 27 | - <pre><code class="#{language}">#{code}</code></pre> | |
| 27 | + <pre><code class="#{language}">#{h.send(:html_escape, code)}</code></pre> | |
| 28 | 28 | </div> |
| 29 | 29 | </div> |
| 30 | 30 | ... | ... |