diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-04-17 12:39:11 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-04-17 12:39:11 +0300 |
commit | cff44b5fb96cf74c1c119511e602e3e6699b0c6f (patch) | |
tree | f30aca337e0e4d1932a4284023839db24738ded5 /lib/banzai | |
parent | a56611e3892b9039f6a8196c37d8b70a3c86c68b (diff) |
make call to 'html_escape' unambiguous
Diffstat (limited to 'lib/banzai')
-rw-r--r-- | lib/banzai/renderer/common_mark/html.rb | 2 | ||||
-rw-r--r-- | lib/banzai/renderer/redcarpet/html.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/banzai/renderer/common_mark/html.rb b/lib/banzai/renderer/common_mark/html.rb index c7a54629f31..46b609c36b0 100644 --- a/lib/banzai/renderer/common_mark/html.rb +++ b/lib/banzai/renderer/common_mark/html.rb @@ -9,7 +9,7 @@ module Banzai lang_attr = lang.present? ? %Q{ lang="#{lang}"} : '' result = "<pre>" \ - "<code#{lang_attr}>#{html_escape(code)}</code>" \ + "<code#{lang_attr}>#{ERB::Util.html_escape(code)}</code>" \ "</pre>" out(result) diff --git a/lib/banzai/renderer/redcarpet/html.rb b/lib/banzai/renderer/redcarpet/html.rb index 94df5d8b1e1..30e815f1224 100644 --- a/lib/banzai/renderer/redcarpet/html.rb +++ b/lib/banzai/renderer/redcarpet/html.rb @@ -6,7 +6,7 @@ module Banzai lang_attr = lang ? %Q{ lang="#{lang}"} : '' "\n<pre>" \ - "<code#{lang_attr}>#{html_escape(code)}</code>" \ + "<code#{lang_attr}>#{ERB::Util.html_escape(code)}</code>" \ "</pre>" end end |