summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-06-29 17:47:37 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-07-05 20:57:09 -0300
commit5d11cf2e98156c7fff403c3d8375da6f9b7edbf3 (patch)
treeead7820692d6d477359168b26ff968ce64e29a3e /lib/banzai
parentd6b60e83edb755347c56e38770fcdffab9edbfa0 (diff)
downloadgitlab-ce-5d11cf2e98156c7fff403c3d8375da6f9b7edbf3.tar.gz
Use CGI.unescapeHTML rather than doing the gsub with a map
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/label_reference_filter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/filter/label_reference_filter.rb b/lib/banzai/filter/label_reference_filter.rb
index fdd4afce606..e258dc8e2bf 100644
--- a/lib/banzai/filter/label_reference_filter.rb
+++ b/lib/banzai/filter/label_reference_filter.rb
@@ -68,7 +68,7 @@ module Banzai
end
def unescape_html_entities(text)
- text.to_s.gsub(/(&gt;)|(&lt;)|(&amp;)/, Label::TABLE_FOR_ESCAPE_HTML_ENTITIES.invert)
+ CGI.unescapeHTML(text.to_s)
end
end
end