Commit 345c4d2a776c3e30d0c05e5954adbfe4142f3519

Authored by Robert Speicher
1 parent ba72c6f6

Update gfm so escaped text is still parsed for references

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
lib/gitlab/markdown.rb
@@ -48,8 +48,10 @@ module Gitlab @@ -48,8 +48,10 @@ module Gitlab
48 def gfm(text, html_options = {}) 48 def gfm(text, html_options = {})
49 return text if text.nil? 49 return text if text.nil?
50 50
51 - # prevents the string supplied through the _text_ argument to be altered  
52 - text = text.dup 51 + # Duplicate the string so we don't alter the original, then call to_str
  52 + # to cast it back to a String instead of a SafeBuffer. This is required
  53 + # for gsub calls to work as we need them to.
  54 + text = text.dup.to_str
53 55
54 @html_options = html_options 56 @html_options = html_options
55 57