diff options
| author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-06-29 17:47:37 -0300 |
|---|---|---|
| committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-07-05 20:57:09 -0300 |
| commit | 5d11cf2e98156c7fff403c3d8375da6f9b7edbf3 (patch) | |
| tree | ead7820692d6d477359168b26ff968ce64e29a3e /lib/banzai | |
| parent | d6b60e83edb755347c56e38770fcdffab9edbfa0 (diff) | |
| download | gitlab-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.rb | 2 |
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(/(>)|(<)|(&)/, Label::TABLE_FOR_ESCAPE_HTML_ENTITIES.invert) + CGI.unescapeHTML(text.to_s) end end end |
