Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-04 12:08:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-04 12:08:20 +0300
commitd80f3cd75e700b6e62910865bfd36734644ffa89 (patch)
treeaa2fa2f2b4385854c13591bef8e74924ef661657 /app/helpers/markup_helper.rb
parentbe81c1578d65f25edfde8aa550f190b8d3e6d976 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/markup_helper.rb')
-rw-r--r--app/helpers/markup_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb
index a0228c6bd94..4f66356c27e 100644
--- a/app/helpers/markup_helper.rb
+++ b/app/helpers/markup_helper.rb
@@ -79,7 +79,7 @@ module MarkupHelper
md = markdown_field(object, attribute, options.merge(post_process: false))
return unless md.present?
- tags = %w(a gl-emoji b pre code p span)
+ tags = %w(a gl-emoji b strong i em pre code p span)
tags << 'img' if options[:allow_images]
text = truncate_visible(md, max_chars || md.length)
@@ -88,7 +88,7 @@ module MarkupHelper
text,
tags: tags,
attributes: Rails::Html::WhiteListSanitizer.allowed_attributes +
- %w(style data-src data-name data-unicode-version data-iid data-project-path data-mr-title)
+ %w(style data-src data-name data-unicode-version data-iid data-project-path data-mr-title data-html)
)
# since <img> tags are stripped, this can leave empty <a> tags hanging around
@@ -233,7 +233,7 @@ module MarkupHelper
def strip_empty_link_tags(text)
scrubber = Loofah::Scrubber.new do |node|
- node.remove if node.name == 'a' && node.content.blank?
+ node.remove if node.name == 'a' && node.children.empty?
end
sanitize text, scrubber: scrubber