summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-10-09 14:20:49 +0200
committerMarin Jankovski <maxlazio@gmail.com>2014-10-09 14:20:49 +0200
commit64e72af3cb65731c84e1aa27b68a04fe378bebd9 (patch)
tree7c151c6911b8d42462aa942be164455ec2709281 /lib
parent099cf3558f9e41022ac38d2f8226bdbe3c9aa470 (diff)
downloadgitlab-ce-64e72af3cb65731c84e1aa27b68a04fe378bebd9.tar.gz
Replace apostrophe with right single quote to avoid markdown interpretation as issue 39.
Diffstat (limited to 'lib')
-rw-r--r--lib/redcarpet/render/gitlab_html.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb
index c3378d6a18f..53c5a1e09c0 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -10,6 +10,11 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
super options
end
+ def normal_text(text)
+ return text unless text.present?
+ text.gsub("'", "&rsquo;")
+ end
+
def block_code(code, language)
# New lines are placed to fix an rendering issue
# with code wrapped inside <h1> tag for next case: