summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/markdown/merge_request_reference_filter.rb1
-rw-r--r--lib/redcarpet/render/gitlab_html.rb13
-rw-r--r--spec/fixtures/markdown.md.erb1
3 files changed, 1 insertions, 14 deletions
diff --git a/lib/gitlab/markdown/merge_request_reference_filter.rb b/lib/gitlab/markdown/merge_request_reference_filter.rb
index 7c28fe112ef..740d72abb36 100644
--- a/lib/gitlab/markdown/merge_request_reference_filter.rb
+++ b/lib/gitlab/markdown/merge_request_reference_filter.rb
@@ -64,7 +64,6 @@ module Gitlab
end
end
- # TODO (rspeicher): Cleanup
def url_for_merge_request(mr, project)
h = Rails.application.routes.url_helpers
h.namespace_project_merge_request_url(project.namespace, project, mr,
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb
index 5a87b230579..bea66e6cdc1 100644
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -13,17 +13,8 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
super(options)
end
- # If project has issue number 39, apostrophe will be linked in
- # regular text to the issue as Redcarpet will convert apostrophe to
- # #39;
- # We replace apostrophe with right single quote before Redcarpet
- # does the processing and put the apostrophe back in postprocessing.
- # This only influences regular text, code blocks are untouched.
def normal_text(text)
- return text unless text.present?
-
- text = ERB::Util.html_escape_once(text)
- text.gsub("'", "&rsquo;")
+ ERB::Util.html_escape_once(text)
end
# Stolen from Rugments::Plugins::Redcarpet as this module is not required
@@ -45,8 +36,6 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end
def postprocess(full_document)
- full_document.gsub!("&rsquo;", "'")
-
unless @template.instance_variable_get("@project_wiki") || @project.nil?
full_document = h.create_relative_links(full_document)
end
diff --git a/spec/fixtures/markdown.md.erb b/spec/fixtures/markdown.md.erb
index b00fc099b4d..0c140758557 100644
--- a/spec/fixtures/markdown.md.erb
+++ b/spec/fixtures/markdown.md.erb
@@ -138,7 +138,6 @@ References should be parseable even inside _!<%= merge_request.iid %>_ emphasis.
- Issue: #<%= issue.iid %>
- Issue in another project: <%= xref %>#<%= xissue.iid %>
-- Ignores HTML entities: TODO:&#39;
- Ignored in code: `#<%= issue.iid %>`
- Ignored in links: [Link to #<%= issue.iid %>](#issue-link)