Update gfm so escaped text is still parsed for references

This commit is contained in:
Robert Speicher 2012-09-19 20:21:35 -04:00
parent ba72c6f683
commit 345c4d2a77

View file

@ -48,8 +48,10 @@ module Gitlab
def gfm(text, html_options = {}) def gfm(text, html_options = {})
return text if text.nil? return text if text.nil?
# prevents the string supplied through the _text_ argument to be altered # Duplicate the string so we don't alter the original, then call to_str
text = text.dup # to cast it back to a String instead of a SafeBuffer. This is required
# for gsub calls to work as we need them to.
text = text.dup.to_str
@html_options = html_options @html_options = html_options