Merge branch '45436-markdown-is-not-rendering-error-loading-viewer-undefined-method-html_escape' into 'master'
Resolve "Markdown is not rendering, "Error loading viewer": undefined method `html_escape'" Closes #45436 See merge request gitlab-org/gitlab-ce!18418
This commit is contained in:
commit
e86923ebac
4 changed files with 8 additions and 3 deletions
|
@ -90,7 +90,7 @@ module TreeHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def commit_in_single_accessible_branch
|
def commit_in_single_accessible_branch
|
||||||
branch_name = html_escape(selected_branch)
|
branch_name = ERB::Util.html_escape(selected_branch)
|
||||||
|
|
||||||
message = _("Your changes can be committed to %{branch_name} because a merge "\
|
message = _("Your changes can be committed to %{branch_name} because a merge "\
|
||||||
"request is open.") % { branch_name: "<strong>#{branch_name}</strong>" }
|
"request is open.") % { branch_name: "<strong>#{branch_name}</strong>" }
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix undefined `html_escape` method during markdown rendering
|
||||||
|
merge_request: 18418
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -9,7 +9,7 @@ module Banzai
|
||||||
lang_attr = lang.present? ? %Q{ lang="#{lang}"} : ''
|
lang_attr = lang.present? ? %Q{ lang="#{lang}"} : ''
|
||||||
result =
|
result =
|
||||||
"<pre>" \
|
"<pre>" \
|
||||||
"<code#{lang_attr}>#{html_escape(code)}</code>" \
|
"<code#{lang_attr}>#{ERB::Util.html_escape(code)}</code>" \
|
||||||
"</pre>"
|
"</pre>"
|
||||||
|
|
||||||
out(result)
|
out(result)
|
||||||
|
|
|
@ -6,7 +6,7 @@ module Banzai
|
||||||
lang_attr = lang ? %Q{ lang="#{lang}"} : ''
|
lang_attr = lang ? %Q{ lang="#{lang}"} : ''
|
||||||
|
|
||||||
"\n<pre>" \
|
"\n<pre>" \
|
||||||
"<code#{lang_attr}>#{html_escape(code)}</code>" \
|
"<code#{lang_attr}>#{ERB::Util.html_escape(code)}</code>" \
|
||||||
"</pre>"
|
"</pre>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue